[Main]
Name=FGetC
Type=Function
Subtype=ROM Call
Header Files=files.h
Definition=unsigned short FGetC (FILES *fsPtr);
MinAMS=2.00
See Also=files.h/TIOS_FOpen: FOpen, files.h/TIOS_FPutC: FPutC, files.h/TIOS_FRead: FRead, files.h/TIOS_FSetPos: FSetPos

[ROM Call]
Index=$3DB

[Description]
Read a byte from an open file.

[Explanation]
FGetC reads a byte from the open file <I>fsPtr</I> (which may be opened in either READ or WRITE mode) at the current file position
and returns the byte, or <A HREF="$$LINK(files.h/FileStatusEnum)">FS_EOF</A> if the end of file was reached.<BR>
<I>fsPtr</I> is a pointer to a <A HREF="$$LINK(files.h/FILES)">FILES</A> structure previously opened with <A HREF="$$LINK(files.h/TIOS_FOpen)">FOpen</A>.
<BR><BR>
Note that the <A HREF="$$LINK(files.h/FILES)">FILES</A> structure pointed to by <I>fsPtr</I> <I>must</I> have been opened with <A HREF="$$LINK(files.h/TIOS_FOpen)">FOpen</A>.
<BR><BR>
FGetC returns the next byte in the file, or <A HREF="$$LINK(files.h/FileStatusEnum)">FS_EOF</A> if the end of file has been reached.

[References]
In=files.h/TIOS_FRead: FRead
