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 - close alternate close alternate file http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 close alternate     Close alternate file
------------------------------------------------------------------------------
 Syntax
   close alternate

 Arguments
   None.

 Description
   The close alternate command closes the current alternate file and
   turns the alternate flag off.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_closealternate
   set alternate to "output.txt"   // set file name
   ? "This is on screen only"
   set alternate on                // switch on writing to file
   ? "This goes to file as well"
   set alternate off               // switch on writing to file
   ? "This is again for eyes only"
   ?
   close alternate                 // file must be closed before accessing it
   ? "File contents:"
   type "output.txt"               // show file
   ?
   erase "output.txt"              // clean up
   endproc

   proc main
   Test_closealternate()
   endproc

See Also: close all set alternate to set alternate

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