Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>althandle() - get/set the set alternate to file handle</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     althandle() - get/set the SET ALTERNATE TO file handle
  Usage:    [<integer>] = althandle([<handle>])
  Params:   integer <handle> from a previous fopen() or fcreate()
  Returns:  integer equal to the current handle in use by SET
            ALTERNATE, or 0 if no file in use.

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

            This example opens a text file with fopen() and then
            uses althandle() to point the SET ALTERNATE TO routine
            to the new handle. Before it uses althandle(), the file
            pointer is moved to the end of the file so the SET
            ALTERNATE TO text is appended to the end of the file
            rather than truncating the file before it writes.

                 handle = fopen("report.txt")
                 fbot(handle)
                 althandle(handle)   && sets alternate on
                 set console off
                 LIST FNAME+LNAME+ADDRESS
                 set alternate off
                 close alternate     && close the file
                 set console on

  Note:     When you pass a file handle to althandle(), it turns
            alternate on as well. Using althandle() you can
            redirect and control the file pointer position using
            the low level DOS file functions (fseek(), ftop() etc.)


See Also: prnhandle()

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