Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - set alternate to control the alternate flag http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 set alternate to    Control the alternate flag
------------------------------------------------------------------------------
 Syntax
   set alternate to <cFile>

 Arguments
   cFile is the name of the file to receive alternate output.

 Description
   The set alternate to command creates an alternate file. The file cFile
   is created, so any existing file is truncated to zero bytes.

   set alternate on must be set after set alternate to. If the cFile
   argument is omitted, set alternate to closes the alternate file (the
   set alternate off command must have been used before).

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_setalternateto
   set alternate to "test1.txt"
   set alternate on                   // open file 1
   ? "File 1"
   close alternate                    // close file
   set alternate to "test2.txt"
   set alternate on                   // open file 2
   ? "File 2"
   set alternate off
   set alternate to                   // close file
   type "test1.txt"                   // display files
   type "test2.txt"
   erase "test1.txt"                  // clean up
   erase "test2.txt"
   endproc

   proc main
   Test_setalternateto()
   endproc

See Also: set alternate

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson