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

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

                 handle = fopen("test.txt")
                 memvar = freadbyte(handle)
                 if memvar = 245
                      do modtest
                 endif

  Note:     The file pointer is moved ahead 1 byte. If an error
            occurs a -1 is returned. A byte value is always in the range
            0 to 255 and is read in as an integer. This negates the need
            to use freadstr() and bin2i() to convert a byte to an integer.


See Also: freadint() freadlong() fwriteint() fwritelong()

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