Commands and Statements |
DEFSNG
DEFDBL
DEFSTR
DEFINT
The DEFSNO, DEFDBL, DEFSTR, and DEFINT statements are used to specify that a given block of letters will designate a specific data type when used as the first letter of variable names. The DEFSNO, DEFDBL, DEFSTR, and DEFINT statements specify single precision floating point, double precision floating point, string, and integer representation, respectively. Blocks of letters are specified according to the syntactic format given below:
DEFXXX m [-n][,m[-n]] ...
in which m represents any letter, A through Z, and n represents any letter B through Z. These two letters represent the boundaries of a block of letters between m and n. If n is not used, only variables beginning with letter m are specified. The n argument must follow m in alphabetic sequence; in other words, blocks may be defined as D to L, or A to 0, but not as P to A or Z to M.
10DEFSTR S
20DEFDBL D
30DEFINT
DEFUSRn
The DEFUSRn statement is used to specify the starting address of an SOSO/SOS5
DEFUSR = OFOOOH
DEFUSR7 = 1%
Because of the way
10INPUT "ENTER ENTRY ADDRESS IN DECIMAL"; A
20IF A> 32767 THEN A = A-65536
30DEFUSR11 = A
The program below shows how DEFUSR defines a subroutine. Refer to Appendix E for further details of using DEFUSR.
10 REM This program asks for three
20REM Integers, passes them to USR1, and
30REM Returns the result.
40DEFINT A-Z
50DEFUSR 1 =OEOOOH
60PRINT "Enter three numbers:"
70 INPUT A, B, C
80 PRINT "A =";A; "B =";B; "C =";C 90 RESULT = USRo/01 (A, B, C)
100PRINT "A+ B+C+ =" RESULT
110END