BASIC-80

Commands and Statements

SAVE string expression [,A]

10 INPUT A,B,C

20PRINT (A + B + C)/3

30END SAVE "AVER"

OK

RUN "AVER"

? 5,8,2

Ok

STOP

The STOP statement halts program execution and prints a BREAK IN (line number) message. Following this, BASIC-80 is in the command mode. After execution of a STOP, program variables may be changed or printed, and, if the program is not changed, execution may be resumed with the CONT command. The END statement also halts execution, but does not print a BREAK IN (line number) message, and closes any open file.

STOP

320 PRINT "END OF PROGRAM"

330STOP RUN

END OF PROGRAM BREAK IN 330

Ok

SWAP

The SWAP statement exchanges the values assigned to any two variables or string variables, provided that they are of the same type.

SWAP variable1, variable2

110 IF X>Y THEN SWAP X,Y

120 PRINT "NEW VALUE OF X IS";X;""AND Y IS NOW";Y

TRON, TROFF

The two program tracing commands, TRON and TROFF, respectively enable and disable the trace function in program execution. When enabled, the number of each line is printed as it is executed, enclosed in square brackets. These commands can also be used within programs to selectively enable and disable tracing.

6-23

Page 63
Image 63
Intel 9800758-02 manual TRON, Troff, ? 5,8,2