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_fileread() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FILEREAD()

 DESCRIPTION

 C_FILEREAD() reads a given number of bytes from a specified file
 handle.  C_FILEREAD() reads up to 1024 bytes or until the new-line
 character, whichever comes first.  This can be used for reading a
 single line of data from a text file.

 NOTES

 This function is an extension of Clipper's low-level file
 functions.  Clipper's function FOPEN() can be used to open the DOS
 file and obtain the file handle needed for this function.

 SYNTAX

 C_FILEREAD(f_handle [,bytes])

 PARAMETERS

 f_handle (N) is the file handle to read.

 bytes (N) is the number of bytes to read.  If the bytes argument is
 not specified, C_FILEREAD() will read up to 1024 characters or
 until the new-line character is reached, whichever comes first.

 RETURNS

 C_FILEREAD() returns a character string of the data read from the
 file, or a null string ("") if end-of-file.

 EXAMPLES

 f1 = fopen("DATA.TXT")         && Open the file

 str = c_fileread(f1,50)        && Read 50 bytes from file handle f1
 str = c_fileread(f1)           && Get one line from file handle f1
 str = c_fileread(f1,1024)      && Read 1024 bytes from file handle f1


See Also: C_FILEWRITE() C_FILEBYTE() C_FILEGRAB() C_FILEEOF()

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