Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>set alternate</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET ALTERNATE


Syntax:     SET ALTERNATE TO [<file>/(<expC>)]

            SET ALTERNATE on/OFF/(<expL>)

Purpose:    To direct output from commands other than @...SAY...GET to a
            text file.

Options:    To: Specifying a <file> as the argument of the TO clause
            opens a standard ASCII text file with a default extension of
            (.txt).  The filename can optionally include an extension,
            drive letter, and/or path.  If a file with the same name
            exists, subsequent output will overwrite the current
            contents of that file.

            Toggle: SET ALTERNATE on/OFF toggles the echo of output
            to the current alternate file.  Note that when you SET
            ALTERNATE OFF, the alternate file is not closed.

Usage:      Alternate files are not related to work areas and only one
            may be open at a time.  To close an alternate file, use
            CLOSE ALTERNATE, CLOSE ALL, or SET ALTERNATE TO with no
            argument.  Note that @...SAYs cannot be echoed to a disk
            file using SET ALTERNATE, but SET PRINTER TO <filename> does
            support this feature.

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   SET ALTERNATE TO Listfile
   SET ALTERNATE ON

   USE Customers

   DO WHILE .NOT. EOF()
      ? Lastname, City
      SKIP
   ENDDO

   CLOSE DATABASE
   CLOSE ALTERNATE

See Also: CLOSE SET PRINTER FCREATE() FOPEN() FWRITE()

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