You've got to feel for Anita.  She's a good candidate for the "U2
Incubator" CD that U2UG is pushing for.  We want a single spot where a
new techie can go to install an instance of the personal edition (or
something close to it) along with explanations, examples, and pointers
to resources.  Stay tuned.

Anita, Below is an example.  There are variations on the theme.

Get used to using BASIC -X option which creates a cross-reference symbol
table.
The first time you compile,  the system will create an object directory,
[name].O  (the one you were missing when you tried to catalog), and a
crossref listing dir, [name].L  if they don't exist.  

VLIST shows you the de-compilation of the object.  It can be very
useful, too.

FORMAT is good, too, for readability.  It is a separate command  and
also an ED command, if you are using the old "ED" line editor.

Warning: CATALOG means sometihing differenct depending on what "flavor"
your account is.


The following example is simple, so -X & VLIST aren't interesting.  They
get interesting with interesting programs.

---------------------------

>CREATE.FILE ANITA.BP 
Please enter the following information for the DICTionary file:

Modulo           =  1
Separation       =  4
File type        =  18

Please enter the following information for the DATA file:

Modulo           =  1
Separation       =  1
File type        =  19            (!! PLEASE !!  "19", not "1" !! )
File description =  Source programs
Creating file "ANITA.BP" as Type 19.
Creating file "D_ANITA.BP" as Type 18, Modulo 1, Separation 4.
Added "@ID", the default record for RetrieVe, to "D_ANITA.BP".
>
>
>ED ANITA.BP MAIN SUB

SELECTed record name = "MAIN".
New record.

----: I
0001= CRT 'MAIN'
0002= CALL SUB( 'this is an argument' )
0003= CRT 'back in MAIN'
0004= STOP
0005= END
0006= 
Bottom at line 5.
----: FI
"MAIN" filed in file "ANITA.BP".

SELECTed record name = "SUB".
New record.

----: I
0001= SUBROUTINE SUB( ARG )
0002= CRT 'SUB'
0003= CRT 'ARG = ':ARG
0004= CRT 'leaving SUB'
0005= RETURN
0006= END
0007= 
Bottom at line 6.
----: FORMAT

----: P
0001:       SUBROUTINE SUB( ARG )
0002:       CRT 'SUB'
0003:       CRT 'ARG = ':ARG
0004:       CRT 'leaving SUB'
0005:       RETURN
0006:    END
Bottom at line 6.
----: FI
"SUB" filed in file "ANITA.BP".

File name        = ANITA.BP
Record name = 
>
>BASIC ANITA.BP MAIN -X
Creating file "ANITA.BP.O" as Type 19.
Creating file "D_ANITA.BP.O" as Type 3, Modulo 1, Separation 2.
Added "@ID", the default record for RetrieVe, to "D_ANITA.BP.O".
Creating file "ANITA.BP.L" as Type 19.
Creating file "D_ANITA.BP.L" as Type 3, Modulo 1, Separation 2.
Added "@ID", the default record for RetrieVe, to "D_ANITA.BP.L".
Compiling: Source = 'ANITA.BP/MAIN', Object = 'ANITA.BP.O/MAIN'

Compilation Complete.
>BASIC ANITA.BP SUB -X
Compiling: Source = 'ANITA.BP/SUB', Object = 'ANITA.BP.O/SUB'

Compilation Complete.
>
>CT ANITA.BP.L SUB

     SUB
0001 ANITA.BP.L/SUB Source Listing
0002 
0003 
0004 Cross Reference Listing
0005 
0006 Variable....... Type..........
References...........................................
0007 
0008 ARG             Scalar Arg     0003
0009 
0010 *  Definition of symbol
0011 =  Assignment of variable
0012 !  Dimension of array
0013 @  Argument to CALL
>
>
>VLIST ANITA.BP MAIN
Main Program "ANITA.BP.O/MAIN"
Compiler Version: 10.0.0.0
Object Level    : 5
Machine Type    : 10
Local Variables : 1
Subroutine args : 0
Unnamed Common  : 0
Named Common Seg: 0
Object Size     : 30
Source lines    : 5

00001: CRT 'MAIN'
00001 00000 : 046 crtcrlf        "MAIN" 

00002: CALL SUB( 'this is an argument' )
00002 00006 : 0F8 move           "this is an argument"  => _T0000 
00002 0000C : 01E call           "SUB" _T0000 

00003: CRT 'back in MAIN'
00003 00014 : 046 crtcrlf        "back in MAIN" 

00004: STOP
00004 0001A : 190 stop           

00005: END
00005 0001C : 190 stop           
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to