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>fwriteint() - write an integer to a file</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     fwriteint() - write an integer to a file
  Usage:    <logical> = fwriteint(<handle>,<integer>)
  Params:   integer <handle> from a previous fopen() or fcreate()
            unsigned integer <integer> - integer to write to the file,
            not greater than 65535.
  Returns:  logical .T. if integer written successfully, .F. if error

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

                 handle = fcreate("test.txt")
                 fwriteint(handle,24356)
                 ? ftell(handle)
                 * prints 2

  Note:     The file pointer is moved ahead 2 bytes. If an error
            occurs a .F. is returned. An integer is in the range
            0 to 65536 and occupies 2 bytes in the file in low
            byte/high byte notation. freadint() negates the need
            to use the i2bin() function to convert a binary
            'string' into an integer, faster too.


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

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