Commands and Statements

BASIC-SO

KILL

The KILL command deletes files from disk storage, and removes all references to the deleted file from the directory. Once a file has been killed, it cannot be reopened.

KILL filename

LET

The LET statement is used to give a value to a variable. If a variable appears to the left of an equal sign not preceded by the word LET, BASIC-SO assumes that a LET statement is implied. When assigning a literal value to a string variable, the value must be enclosed in quotation marks.

[LET] variable = expression

10LET A=5

20PRINT A RUN

Ok

LINE INPUT

The LINE INPUT statement reads an entire line of data and assigns it as the value of the specified string variable. LINE INPUT does this in two ways: first, data may be read from the terminal and assigned; second, data may be read from a disk file and assigned.

When entering data from a terminal, the syntactic format is:

LINE INPUT [string expression;] string variable

This statement will print the string expression as a prompt and will haIt until the string is entered and a carriage return has been entered. Entering a Control-C will abort LINE INPUT and return BASIC-SO to the Command Mode. A CONT com- mand may then be used to re-enter the LINE INPUT statement.

When entering data from a disk file, the syntactic format used is:

LINE INPUT .file number,string variable

This statement reads data from the specified disk file until a carriage return is en- countered. The data is assigned as a value for the specified string variable, and LINE INPUT skips over the encountered carriage return-line feed to point to the begin- ning of the next string. If no carriage return is encountered, the statement returns the next 255 characters of data. See Chapter 5 for further information about disk file I10~

LIST

The LIST command prints the current program's text to the console. Instruction lines are listed in sequential order. As shown below, the LIST command may be used to display the entire program, all instruction lines up to or after a given line, or a block of instruction lines within the program. The period may be used as an abbreviation for the last line which was changed, contained an error, or was listed.

LIST [line numberl-line numbeq line number-I line number-line number}

6-10

Page 50
Image 50
Intel 9800758-02 manual Kill, Let, Line Input, List