Difference between revisions of "SET ALTERNATE"
Barrymavin (Talk | contribs) (→Example) |
Helengeorge (Talk | contribs) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Capture output text in a file | Capture output text in a file | ||
Line 12: | Line 5: | ||
==Syntax== | ==Syntax== | ||
SET ALTERNATE ON | OFF | (<expL>) | SET ALTERNATE ON | OFF | (<expL>) | ||
+ | |||
SET ALTERNATE TO [<.txt filename> | (<expC>)] | SET ALTERNATE TO [<.txt filename> | (<expC>)] | ||
==See Also== | ==See Also== | ||
− | [[CLOSE ALTERNATE]], [[ | + | [[CLOSE ALTERNATE]], [[PRINT]], [[SET DEVICE]], [[SET PRINT]], [[SET PRINTER]] |
Line 43: | Line 37: | ||
set alternate on | set alternate on | ||
setprc(0,0) && set coordinates to 0,0 | setprc(0,0) && set coordinates to 0,0 | ||
− | @1,0 say | + | @1,0 say "write this to file to the file, not to the screen" |
close alternate | close alternate | ||
set console on | set console on | ||
Line 51: | Line 45: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
+ | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|ALTERNATE]] | [[Category:Set_Commands|ALTERNATE]] | ||
+ | [[Category:Input Output]] | ||
+ | [[Category:Input Output Set Commands]] |
Latest revision as of 16:41, 12 November 2009
Purpose
Capture output text in a file
Syntax
SET ALTERNATE ON | OFF | (<expL>)
SET ALTERNATE TO [<.txt filename> | (<expC>)]
See Also
CLOSE ALTERNATE, PRINT, SET DEVICE, SET PRINT, SET PRINTER
Description
The SET ALTERNATE command provides the ability to record all textual output into a file. This command is primarily used when generating reports, which can later be printed on the system printer with the PRINT command. Full screen form operations are not recorded in the alternate file, but @...SAY commands are.
The SET ALTERNATE TO command is used to specify the target filename for the operation. If no filename extension is specified, then ’.txt’ is used. The filename can be substituted with an <expC>, enclosed in round brackets, which returns a valid filename.
You may enable and disable the writing of output to the alternate file with the SET ALTERNATE ON and OFF command. To close the alternate file use either the CLOSE ALTERNATE command or issue a SET ALTERNATE TO with no filename specified.
If SET ALTERNATE ON is issued, and no SET ALTERNATE TO <.txt filename> is active, then the alternate filename ’alternate.txt’ will be used. This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, ALTERNATE is set ON. If a value of .F. is returned, ALTERNATE is set OFF. Note that <expL> should be enclosed in round brackets.
By default, ALTERNATE is OFF.
Example
set alternate to alt ? "Write this text to file" set alternate off ? "Don’t write this text to file" ? set console off set screenmap off set device to print set alternate on setprc(0,0) && set coordinates to 0,0 @1,0 say "write this to file to the file, not to the screen" close alternate set console on set screenmap on set device to screen return
Products
Recital Server, Recital