[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|              FGETS              |
+---------------------------------+
FGETS(<expN1> [, <expN2>])

-----------------------------------
Returns series of bytes from file or communications port opened with
low-level file function.
Return value - Character
-----------------------------------

Similar to the FREAD() function, FGETS() returns a series of bytes from
a file or port until a carriage return is encountered.  By using a
series of FGETS() function calls, you can read a file line by line.

FGETS() returns a series of bytes from a file or port as a character
string.  Bytes are returned starting from the file pointer position and
continuing until a carriage return is encountered.  The file pointer is
then positioned on the byte immediately following the carriage return.
Line feeds are ignored by FGETS().

<expN1>
        File handle.

<expN2>
        Number of bytes to be returned.  FGETS() will return <expN2> bytes
unless a carriage return is encountered first.  If a carriage return is
encountered within <expN2> bytes, FGETS() will return all bytes between
the starting file pointer position and the carriage return.  If <expN2>
is not included, FGETS() returns 254 bytes by default.

-----------------------------------

See Also:  FCHSIZE(), FCLOSE(), FCOUNT(), FCREATE(), FEOF(), FERROR(),
FFLUSH(), FOPEN(), FPUTS(), FREAD(), FSEEK(), FSIZE(), FWRITE()

-----------------------------------

See Also: FCHSIZE() FCLOSE() FCOUNT() FCREATE() FEOF() FERROR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson