WRITE Command¶
Material prepared from M Programming Book [WALTERS1997] (Pages 39-42) [WALTERS1997] and GT.M Programmer’s Guide
Description¶
W[RITE]
W[RITE]: (variable|*variable|formatting)
Arguments:
Must be one of the following:
- variable
- string litteral
- format command
- *variable
When the arguments are variables or string litterals, they get to be written to the current output device, as defined by the variable $IO, or set by the USE Command.
Formatting commands control how the cursor is going to be manipulated before and after writing the text.
When the argument is a numerical expression preceeded by the * symbol, then the expression is used as an ASCII value and the WRITE command prints the character corresponding to that ASCII value.
Examples¶
WRITE "Hello ",YOURNAME,!
WRITE \*65
This prints the letter A which is the character corresponding to the ASCII value 65.