PRINT and DISP Statements

 
With both PRINT and DISP, if you separate arguments in a print list with commas, they will be printed in columns. The columns are ten characters wide. If you want "compressed" format, substitute a semicolon in place of the comma. In compressed format, numerics are printed with one additional trailing space and strings are printed with no additional spaces. You may also end a print list with a semicolon to suppress the usual CR/LF that forces a new line. Then you can continue output on the same line with another PRINT statement. If the default PRINT/DISP formats are not acceptable, USING can be specified to format the data as desired.
 
Numbers are printed with twelve significant digits. If the number is outside the range 1E-4 and 1E+6 then the number is printed in scientific notation. If the number is positive, it is always preceded by one space, even in the compressed format. If it is negative, the negative sign is printed in place of the leading space.
Complex numbers are printed in rectangular form, first the real part, then an extra space, and finally the imaginary part. The real and imaginary parts are printed using the print rules given in the previous paragraph.
 
You can position text on the screen with TAB(column) and TABXY(column,row). The left-most column is column one, and the top-most row is row one. TAB can also be used on a printer; TABXY can only be used on the screen. The following example illustrates use of TABXY.
 
10  ! Display time in upper-right corner for 30 seconds
20    St=TIMEDATE ! start time
30    REPEAT
40      PRINT TABXY(70,1);TIME$(TIMEDATE)
50    UNTIL TIMEDATE>St+30
60    END 
 
A full array can be printed by using the array name with a full array specifier. The elements are printed in row major order, and in fields determined by the punctuation following the array.