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>freadlong() - read in a long integer from a file</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     freadlong() - read in a long integer from a file
  Usage:    <integer> = freadlong(<handle>)
  Params:   integer <handle> - handle from a previous fopen()
  Returns:  unsigned integer equal to a long (4 bytes read), -1 for error

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

                 handle = fopen("test.txt")
                 numarray[1] = freadlong(handle)
                 numarray[2] = freadlong(handle)

  Note:     The file pointer is moved ahead 4 bytes. If an error
            occurs a -1 is returned. A long value is in the range
            0 to 4,294,967,295 and occupies 4 bytes in the file
            in low byte/high byte notation. freadlong() should
            only be used to read in long integers written by
            fwritelong() or other programs that write longs in low
            byte/high byte notation Like 'C'. Using freadint() or

            freadlong() eliminates the need to use the fread() and
            bin2i() or bin2l() functions to convert a string to an integer.


See Also: freadint() freadbyte() fwritebyte() fwriteint() fwritelong()

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