WRITE: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
(Created page with "The {{KW|WRITE}} statement writes a comma-separated list of values to the screen without spacing. {{PageSyntax}} :{{KW|WRITE}} [{{Parameter|expression, List}}] {{PageDescription}} * {{Parameter|expressionList}} is a comma-separated list of variable or literal values to be written to the screen. * Write statement separates displayed values using comma separators(required) that will display on the screen. * Leading and trailing number spaces are omitted when d...") |
No edit summary |
||
Line 8: | Line 8: | ||
{{PageDescription}} | {{PageDescription}} | ||
* {{Parameter|expressionList}} is a comma-separated list of variable or literal values to be written to the screen. | * {{Parameter|expressionList}} is a comma-separated list of variable or literal values to be written to the screen. | ||
* Write statement separates displayed values using [[comma]] separators(required) that will display on the screen. | * Write statement separates displayed values using [[comma]] separators(required) that will display on the screen. | ||
* Leading and trailing number spaces are omitted when displaying numerical values. | * Leading and trailing number spaces are omitted when displaying numerical values. | ||
* [[STRING|String]] [[quotation mark]]s will also be displayed. | * [[STRING|String]] [[quotation mark]]s will also be displayed. | ||
Line 23: | Line 23: | ||
{{CodeEnd}} | {{CodeEnd}} | ||
{{OutputStart}} | {{OutputStart}} | ||
123 Hello 3.1415 | 123 Hello 3.1415 | ||
123,"Hello",3.1415 | 123,"Hello",3.1415 | ||
{{OutputEnd}} | {{OutputEnd}} | ||
Revision as of 03:00, 23 January 2023
The Template:KW statement writes a comma-separated list of values to the screen without spacing.
Syntax
- Template:KW [expression, List]
Description
- expressionList is a comma-separated list of variable or literal values to be written to the screen.
- Write statement separates displayed values using comma separators(required) that will display on the screen.
- Leading and trailing number spaces are omitted when displaying numerical values.
- String quotation marks will also be displayed.
- Semicolons cannot be used in or following the WRITE statement!
Example: Comparing WRITE to the same PRINT statement.
a% = 123 b$ = "Hello" c! = 3.1415 PRINT a%, b$, c! 'commas display tab spaced data WRITE a%, b$, c! 'displays commas between values, strings retain end quotes |
123 Hello 3.1415 123,"Hello",3.1415 |
See also