====== PRINT ====== Shows the content of a literal string or a string variable on screen by default, or to a file or output device specified by optional arguments. **Implemented by:** [[:basics:Dartmouth:dartmouth4]], [[:basics:ANSI:ansimin]], [[:basics:ANSI:ansifull]], [[:basics:decbasic:]], [[:basics:Altair:]], [[:basics:a2int:]], [[:basics:Applesoft:]], [[:basics:TI994:]], [[:basics:CBM:]], [[:basics:Atari:]], [[:basics:msatari:]], [[:basics:Sinclair:]], [[:basics:GWBASIC:]], [[:basics:MSX:]], [[:basics:bwbasic:]], [[:basics:bwbasic:bw32]], [[:basics:msamiga:]], [[:basics:msqb:QBasic]], [[:basics:VBDOS:]], [[:basics:FreeBASIC:]], [[:basics:Gambas:]], [[:basics:ugBASIC:]], [[:basics:minibasicmm:]], [[:basics:minibasicjs:]], [[:basics:EndBASIC:]] **With variations:** [[:basics:Dartmouth:dartmouth1]] (no semicolon for line continuation), [[:basics:Dartmouth:dartmouth2]] (semicolon advanced to the next multiple of 3 column), [[:basics:hptsb:]], [[:basics:CBM:Simons1]], [[:basics:trs80:]] (introduced PRINT [[AT]]), [[:basics:trs80:level2]] (also PRINT@), [[:basics:trs80:trsdisk]] (with # for writing to file), [[:basics:trs80:level3]] (the PRINT#-3 variation), [[:basics:trscolor:]] (also PRINT @, linear location), [[:basics:trscolor:colormc]], [[:basics:Sinclair:spectrum]], [[:basics:Atom:]], [[:basics:BBC:]] (also as PRINT#), [[:basics:ABasiC:]] **Also written as: ** /* Alternative spellings and abbreviations this keyword has. No need to refer to a BASIC, there is a section for that later. */ ===== Usage ===== PRINT has some punctuation formatting available since its begginings: * When the string to be printed has nothing after it, a new line is automatically inserted. * When the string(s) to be printed are separated or followed by **comma**, a tabulation is inserted instead of a new line. The tab size is machine dependent. * When the string(s) to be printed are separated or followed by **semicolon**, nothing is inserted and the following string or PRINT will happen right after. * Exception: positive numbers have a space printed before them because of an "invisible" sign.((SANDERS, William B. //The Amiga Microsoft BASIC Programmer's Guide//.)) ==== Variations ==== ===== Examples ===== The canonical and most famous first example of every programming language: 10 PRINT "HELLO" ===== Comments ===== /* Origin of the keyword, opinions, history... */ ===== Related keywords ===== /* Keywords that are often or always used along this one */ * [[:keywords:USING]] ===== Similar keywords ===== /* Keywords with the same or similar functionality found in other versions of BASIC */ ===== In other languages... ===== /* For parallels and comparisons with other modern-day languages */ ===== Other tags ===== {{tag>Statements}} ===== References ===== /* If you used the ((citation)) syntax elsewhere in the text, they will appear under this section. But you can write some recommendations of books, magazines, etc */