int e l 4.21 DESCRIPTION OF STATEMENTS STATEMENT: PRINT or P. (? VERSION 1.1 ONLY) MODE: COMMAND and/or RUN TYPE: INPUT/OUTPUT The PRINT statement directs MCS BASIC-52 to output to the console device. The value of expressions, strings, literal values, variables or test strings may be printed out. The various forms may be combined in the print list by separating them with commas. If the list is terminated with- a comma, the carriage return/line feed will be suppressed. P. is a "shorthand" notation for PRINT. In Version 1.1 ? is also "shorthand" notation for PRINT. EXAMPLES:
>PRINT 10*10,3*3 >PRINT "MCS-51" >PRINT 5,1E3 100 9 MCS-51 5 1000 Values are printed next to one another with two intervening blanks. A PRINT statement with no arguments causes a carriage return/line feed sequence to be sent to the console device. SPECIAL PRINT FORMATTING STATEMENTS TAB([expr]) The TAB([expr]) function is used in the PRINT statement to cause data to be printed out in exact locations on the output device. TAB([expr]) tells MCS BASIC-52 which position to begin printing the next value in the print list. If the printhead or cursor is on or beyond the specified TAB position, MCS BASIC-52 will ignore the TAB function. EXAMPLE:
>PRINT TAB(5),"X",TAB(10),"Y" X Y SPC([expr]) The SPC([expr]) function is used in the PRINT statement to cause MCS BASIC-52 to output the number of spaces in the SPC argument. EXAMPLE: >PRINT A,SPC(5),B may be used to place an additional 5 spaces between the A and B over and above the two that would normally be printed. - 54 -