WRITE

From STX Wiki
< Programmer Guide‎ | Command Reference
Revision as of 15:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

WRITE

WRITE file text [/Newline ... /Newline]

WRITE file format args /Format [/Newline ... /Newline]

Write text into a file connected to a file item. If no /Newline option is specified the text of the next write command will be placed in the same line. Format strings are described in Format Strings and Rules.

file
The name of a file item (opened for write access).
text
The output text (unformatted, written "as is").
format
The format string (see Format Strings and Rules).
args
The arguments (one for each variable format tag).

Example

#f := $(new file * test.txt /T /W)WRITE $#f 'this is %d format for %3.0f numbers' 1 0.2*10 /Newline /Format

The file test.txt contains the following line 'this is 1 format for 2 numbers'.

Navigation menu

Personal tools