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>fbol() - rewind file pointer to start of current line</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     fbol() - rewind file pointer to start of current line
  Usage:    <integer> = fbol(<handle>,[<linelen>])
  Params:   integer <handle> from a previous fopen() or fcreate()
            integer <linelen> - the maximum length of a line if no
            newline character is encountered, optional - default
            is 512 bytes
  Returns:  an integer equal to the starting position of the current
            line of text or -1 if an error occurs. The file
            pointer is moved to the first byte of the current
            line of text.

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

                 handle = fopen("data.txt")
                 flocate(handle,"SHARK",.T.)
                 fbol(handle)
                 datatext = freadline(handle)

            This example finds the keyword "shark" and then
            rewinds to the beginning of the line that contains the
            word "shark" to start reading in the data.

  Note:     The fbol() function will use the character specified
            by the _newline() function as a line terminator. See
            the documentation on _newline() for more information


See Also: freadline() fadvance() frewind() flocate() _newline()

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