User Tools

Site Tools


en:print

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:print [2016/01/01 22:41]
127.0.0.1 external edit
en:print [2020/04/17 09:13] (current)
admin
Line 1: Line 1:
 ===== Print (Statement) ===== ===== Print (Statement) =====
 ==== Format ==== ==== Format ====
-**print** //expression// [ ; ]+**print** [[expressions|expression]] [ ; ]\\ 
 +**?** [[expressions|expression]] [ ; ]\\ 
 +**print** [[expressions|expression]] ,[[expressions|expression]]...\\ 
 +**?** [[expressions|expression]] ,[[expressions|expression]]...
  
 ==== Description ==== ==== Description ====
-Writes text to the text output window, appending a new line.  If the optional semicolon is included, no new line is appended.+Writes text to the text output window, appending a new line.  If multiple expressions are included in a single print statement, separated by commas, they will be output in 14 character wide left justified columns. 
 + 
 +If the optional semicolon is included at the end of the statement, no new line is appended.  The new line suppress is only available for print with a single expression. 
 + 
 +==== Example ==== 
 + 
 +<code> 
 +print "all one" 
 +? "some"; 
 +print "more" 
 +for t = 1 to 10 
 + ? t, t*2 
 +next t 
 +</code> 
 +Will output: 
 +<code> 
 +all one 
 +somemore 
 +1             2 
 +2             4 
 +3             6 
 +4             8 
 +5             10 
 +6             12 
 +7             14 
 +8             16 
 +9             18 
 +10            20 
 +</code>
  
 ==== See Also ==== ==== See Also ====
 {{page>en:start#Text Output&noheader}} {{page>en:start#Text Output&noheader}}
  
 +==== History ==== 
 +|2.0.0|Added columnar output (comma) and the '?' as shortcut|
en/print.1451713304.txt.gz · Last modified: 2020/02/28 10:46 (external edit)