Difference between revisions of "SET ALTERNATE"

From Recital Documentation Wiki
Jump to: navigation, search
(Example)
Line 1: Line 1:
=SET ALTERNATE=
 
 
 
 
==Class==
 
==Class==
 
Input/Output
 
Input/Output
Line 16: Line 13:
  
 
==See Also==
 
==See Also==
[[CLOSE ALTERNATE]], [[SET DEVICE]], [[PRINT]], [[SET PRINT]], [[SET PRINTER]]
+
[[CLOSE ALTERNATE]], [[PRINT]], [[SET DEVICE]], [[SET PRINT]], [[SET PRINTER]]
  
  
Line 52: Line 49:
 
==Products==
 
==Products==
 
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
 
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
 +
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|ALTERNATE]]
 
[[Category:Set_Commands|ALTERNATE]]

Revision as of 11:53, 15 April 2009

Class

Input/Output


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 Database Server, Recital Mirage Server, Recital Terminal Developer