[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

1) Numeric items are followed by an added space.
2) Positive numbers have a space preceding them.

When you use blanks or no punctuation between string constants or variable names it has the same effect as a semicolon. However, blanks between a string and a numeric item or between two numeric items will stop output without printing the second item.

If a comma or a semicolon is at the end of the output-list, the next PRINT statement begins printing on the same line, and spaced accord- ingly. If no punctuation finishes the list, a carriage-return and a line- feed are printed at the end of the data. The next PRINT statement will begin on the next line. If your output is directed to the screen and the data printed is longer than 40 columns, the output is continued on the next screen line.

There is no statement in BASIC with more variety than the PRINT statement. There are so many symbols, functions, and parameters associated with this statement that it might almost be considered as a language of its own within BASIC; a language specially designed for writing on the screen.

EXAMPLES of PRINT Statement:
 1)
    5 X = 5
   10 PRINT -5*X,X-5,X+5,X^5

   -25     0     10     3125


 2)
    5 X=9
   10 PRINT X;"SQUARED IS";X*X;"AND";
   20 PRINT X "CUBED IS" X^3

   9 SQUARED IS 81 AND 9 CUBED IS 729


 3)
    90 AA$="ALPHA":BB$="BAKER":CC$="CHARLIE":DD$="DOG":EE$="ECHO"
   100 PRINT AA$BB$;CC$ DD$,EE$

   ALPHABAKERCHARLIEDOG     ECHO

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated November 08, 1998.