Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_frev() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FREV()

 DESCRIPTION

 C_FREV() reverses the specified file handle to the previous line in
 a text file.

 NOTES

 Each line in the text file must be terminated with a new-line character
 (ASCII 13 and 10) and the line can not be greater than 500 bytes.

 SYNTAX

 C_FREV(handle [,current_line])

 PARAMETERS

 handle (N) is the file handle number assigned when the file was opened.

 current_line (N) indicates whether C_FREV() should reverse to the
 beginning of the previous line or the beginning of the current
 line.  Specify zero (0) to reverse to the beginning of the current
 line or one (1) to reverse to the beginning of the previous line.
 If current_line is not specified, the default of 1 is used.

 RETURNS

 C_FREV() returns the new position in the file after moving the file
 pointer.

 EXAMPLES

 f1 = fopen("test.txt",2)       && open for read/write
 ...
 for i = 1 to 20
   linepos[i] = c_fadv(f1)      && store line positions
 next

 for i = 1 to 10
   c_frev(f1)                   && reverse 10 lines
 next


See Also: C_FADV()

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