Difference between revisions of "Semicolon"
Jump to navigation
Jump to search
Navigation:
imported>Clippy m |
imported>Clippy m |
||
Line 9: | Line 9: | ||
− | * Numerical values [[PRINT|printed]] will include a space before and after each value printed. * Use the [[WRITE]] statement to print values with only commas between the values. | + | * Numerical values [[PRINT|printed]] will include a space before and after each value printed. |
+ | * Use the [[WRITE]] statement to print values with only commas between the values and no spacing. | ||
* Use a semicolon after text that will be [[PRINT|printed]] on the last two text rows of a [[SCREEN (statement)|screen mode]] to prevent screen rolling. | * Use a semicolon after text that will be [[PRINT|printed]] on the last two text rows of a [[SCREEN (statement)|screen mode]] to prevent screen rolling. | ||
* [[INPUT]] statements can use the semicolon '''before''' the text to prevent screen rolling. '''INPUT ; "text or question"; variable'''. | * [[INPUT]] statements can use the semicolon '''before''' the text to prevent screen rolling. '''INPUT ; "text or question"; variable'''. |
Revision as of 01:46, 18 October 2010
The semicolon is used in a PRINT statement to stop the cursor immediately following the printed value so that another value can be appended.
Usage: PRINT "Value ="; value1; value2; value3
1234 5678 9012
- Numerical values printed will include a space before and after each value printed.
- Use the WRITE statement to print values with only commas between the values and no spacing.
- Use a semicolon after text that will be printed on the last two text rows of a screen mode to prevent screen rolling.
- INPUT statements can use the semicolon before the text to prevent screen rolling. INPUT ; "text or question"; variable.
- A semicolon after the text will create a question mark and space after the INPUT text question. Use a comma for statements.
- NOTE: Semicolons can NOT be used to combine string variables in a string variable definition!
- Use the + concatenation operator to combine string variable definition values only!
See also: