23 clrline$ function, 22 clrscr$ function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 96

Advertising
background image

7Ć8

information about printing and zoned fields can be found in

PRINT/PRINT USING Statements in section 6.8.

7.22

CLRSCR$ Function

Format:

CLRSCR$(option)

where:

option is an integer variable or integer expression that defines

the clear screen option to perform.

CLRSCR$ returns an ASCII string or escape sequence. This escape

sequence will clear various parts of a screen on a terminal that

recognizes the ANSI standard eraseĆinĆdisplay escape sequence

(ESC [option J]). The option values are as follows:

0 = Erase from the active cursor position to the end of the

screen, inclusive.

1 = Erase from the start of the screen to the active cursor

position, inclusive.

2 = Erase all of the display.

For example,
CLR_SCREEN% = 2

PRINT; CLRSCR$(CLR_SCREEN%); (Clears entire

display screen)ą ă

When using the CLRSCR$ function with the PRINT statement, a

semicolon should always be located in front of the function call to

tell BASIC not to put the string (generated by the function call) in a

zoned field (a field that is a multiple of 15 characters).
If the semicolon is not used, BASIC will pad the front of the escape

sequence with spaces, which will most likely not have the desired

effect: to move the cursor rather than to print something. Further

information about printing and zoned fields can be found in

PRINT/PRINT USING statements in section 6.8.

7.23

CLRLINE$ Function

Format:

CLRLINE$(option)

where:

option is an integer variable or integer expression that defines

the clear line option to perform.

CLRLINE$ returns an ASCII string or escape sequence.

This escape sequence will clear various parts of a display line on a

terminal that recognizes the ANSI standard eraseĆinĆline escape

sequence. The options are as follows:
ESC [0K Erase from the active cursor position to the end of the line,

inclusive.

ESC [1KErase from the start of the line to the active cursor position,

inclusive.

Advertising
This manual is related to the following products: