BASIC-SO

Entering and Editing

The syntax of the X subcommand is:

X character [character] ...

Returning to the previous example, if you wish to add text at the end of the given in- struction line, use the X subcommand:

40 • Enter (X)

40IF A>B THEN 120 ELSE PRINT "UNDEFINED SET" • Enter new text at the cursor-;A; B (ESC) (L):

40 IF A >B THEN 120 ELSE PRINT "UNDEFINED SET";A; B

S Subcommand

The S subcommand examines characters to the right of the cursor., to find the nth occurrence of the specified character, where n is an integer in the range 1 to 255; the default is 1. This subcommand skips the first character to the right of the cursor and searches, printing all characters encountered. When the nth occurrence of the speci- fied character is found, the cursor stops at the character. If the nth occurrence of the specified character is not found, the cursor stops at the end of the line.

The syntax of the S subcommand is:

[integer] S character

The S subcommand can be used with an example to find the nth occurrence of the specified character. Suppose we want to move the cursor to the space occupied by the 3rd letter "E" in line 40:

40 •

Enter (3SE):

40 IF A>B THEN 120 ELSE •

At this point, the other editing subcommands may be used.

K Subcommand

The K subcommand functions like the S subcommand characters passed over until the nth occurrence of the deleted characters are enclosed in backslashes.

The syntax of the K subcommand is:

[integer] K character

except that it deletes all specified character. The

The K subcommand may be used on our example. It will eliminate all text up to the 1st occurrence of P, and print backslashes:

40 •

Enter (1 KP)

\40\ IF A>B THEN 120 ELSE. Enter (L)

40 PRINT "UNDEFINED SET";A; B

3-5

Page 27
Image 27
Intel 9800758-02 manual Syntax of the X subcommand is, At this point, the other editing subcommands may be used