Print [#output_object], [@location], item list – BrightSign BrightScript 2 Reference Guide User Manual
Page 29

29
PRINT [#output_object], [@location], item list
Prints an item or a list of items on the console, or if output_object is specified, to an
object that has an “ifStreamSend” interface. . The items may be either strings, number,
variables, or expressions. Objects that have an ifInt, ifFloat, or ifString interface may
also be printed.
The items to be PRINTed may be separated by commas or semi-colons. If commas are
used, the cursor automatically advances to the next print zone before printing the next
item. If semi-colons are used, no space is inserted between the items printed.
Positive numbers are printed with a leading blank (instead of a plus sign); all numbers are
printed with a trailing blank; and no blanks are inserted before or after strings.
Examples:
x=5:print 25; "is equal to"; x ^2
run
25 is equal to 25
a$="string"
print a$;a$,a$;" ";a$
run
stringstring string string
print "zone 1","zone 2","zone 3","zone 4”
run
zone 1 zone 2 zone 3 zone 4
each print zone is 16 char wide. the cursor moves to the next print zone each time a
comma is encountered.
print "print statement #1 ";
print "print statement #2"
run
print statement #1 print statement #2
Semi-colon‟s can be dropped in some cases. For example, this is legal:
Print “this is a five “5”!!”
A trailing semi-colon over-rides the cursor-return so that the next PRINT begins where
the last one left off .
If no trailing punctuation is used with PRINT, the cursor drops down to the beginning of
the next line.