HTBasic Help
×
Menu
Index

DISP

Displays items on the CRT display line.
 
 DISP [ item-list [{,|;}]]
DISP USING image [; item-list]
 
Usage:
DISP Display$;
DISP TAB(8),Head,TAB(25),Descrip
DISP USING "5Z.DD";Figures
DISP USING Report;List(2),List(3),List(4)
 
Example: DISP.BAS
 
Description:
Without USING
If USING is not specified, the standard numeric format will be used to display items. The standard numeric format will display a number in floating point form rounded to 12 digits if its absolute value is in the range 1E-4 to 1E+6. The number will be displayed in scientific notation if it is outside this range.
The punctuation following the item to be displayed determines the item's display field. The compact field is used if a semicolon follows the item; and the default display field is used if a comma follows the item.
 
In both compact and default display form, numbers are displayed with one leading blank for positive numbers or the minus sign for negative numbers. In compact field form numeric items are displayed with one trailing blank and string items are displayed with no leading or trailing blanks. The default display form displays items with trailing blanks to fill to the beginning of the next 10-character field. A complex number is displayed in rectangular form, first the real part, then an extra blank and finally the imaginary part.
 
An array may be displayed in row-major order using the full-array-specifier. If punctuation follows an array then the array elements are displayed either in compact field (if semicolon) or default display field (if comma) and additionally the automatic EOL sequence will be suppressed.
 
With USING
See IMAGE for a complete explanation of the image list. The items specified in the image list are acted upon as they are encountered. Each image list item should have a matching display item. Processing of the image list stops when no matching display item is found. Conversely, the image list is re-used starting at the beginning to provide matches for all remaining display items. The TAB function and any trailing punctuation may not be specified with USING.
 
Control Characters
The following control characters have a special meaning when used in DISP statements:
 
Character                Meaning
CTRL-G, CHR$(7)          sounds the bell.
CTRL-H, CHR$(8)           moves the cursor back 1 space.
CTRL-L, CHR$(12)         clears the display line (form feed).
CTRL-M, CHR$(13)        moves the cursor to column 1 so next character sent clears display line (unless it is a CR).
 
Character
Meaning
CTRL-G, CHR$(7)
Sounds the bell.
CTRL-H, CHR$(8)
Moves the cursor back 1 space
CTRL-L, CHR$(12)
Clears the display line (form feed),
CTRL-M, CHR$(13)
Moves the cursor to column 1 and the display line is cleared by the next character sent to the display (unless it is a CR).
 
Scrolling
If the data displayed on the DISP line is too long, the data is scrolled to the left so that the final portion is completely displayed. If the DISP statement ends with a comma or semicolon, the next DISP statement concatenates data on the end of the existing data. Again, the data is scrolled if necessary to display the final portion of the data.
 
See Also: