Specifications

Commands - 88
PRINT
Statement
PR [#n,] [expression] [; or ,] [expression]..
PRINT [#n,] [expression] [; or ,] [expression]..
PURPOSE: To output data through the specified serial or display port.
REMARKS: If all of the expressions are omitted, a carriage return is performed. If the list of expressions is
included, the values of the expressions are displayed on the screen. The expressions in the list may
be numeric and/or string expressions. String constants must be enclosed in quotation marks.
The position of each printed item is determined by the punctuation used to separate the items in the
list. In the list of expressions, a comma causes a tab to the next print zone (print zones are 14
characters wide). A semicolon does not place any spaces between the printed items. If the list of
expressions terminates without a semicolon or a comma, a carriage return is printed at the end of the
line.
Printed numbers are always followed by a space. Positive numbers are preceded by a space.
Negative numbers are preceded by a minus sign.
n = valid port number. Port numbers are 1 and 2 for serial; 9 for VF display; 10 for LCD display.
LCD and VF displays must be configured using the CONFIG DISPLAY command before use.
RELATED: PRINT$, PRINT USING
EXAMPLE: In the example below, the semicolons in the PRINT statement cause each value to be printed in the
same line.
10 X=5
20 PRINT X + 5; X – 5; X * (–5)
RUN
10 0 –25
The following is an example of string concatenation. The output is through the COM2 serial port.
30 A$ = "Hi"
40 B$ = " there"
50 PRINT #2,A$+B$
RUN
Hi there