The PRINT statement

The PRINT statement
    This statement writes the results of computations performed by the computer on the printer.
    The form of the PRINT statement is
    PRINT.jpg
    where
    list --- may be constants, variables, expressions or message separated by
    commas or semicolons
    eg :
    90 PRINT A, B, C
    This will print the value stored in A, B and C
    92 PRINT “PRITAM”
    This will print the word PRITAM.
    94 PRINT “ P =”,P
    Outputs the value of variable P which is preceded by the name of the variable, that is, first will be printed P= and then the value of P.
    96 PRINT 6 +7*2, A
    the value of expression 6+7*2 is calculated first. It is 20. Then 20 and the value of ‘A’ are printed, in that order, on the same line.
    98 PRINT
    When this statement is executed, a line is skipped on the printer. Thus, this form of PRINT statement is useful to insert spaces in the output data.

Last modified: Wednesday, 18 January 2012, 11:07 PM