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

[ROM Call]
Index=$3DF

[Description]
Write a byte to a file opened in write mode.

[Explanation]
FPutC writes the byte <I>byte</I> to the file <I>fsPtr</I> opened in write mode at the current file position. 
The <A HREF="$$LINK(files.h/FILES)">FILES</A> structure pointed to by <I>fsPtr</I> must have been opened with
<A HREF="$$LINK(files.h/TIOS_FOpen)">FOpen</A> in write mode.
<BR><BR>
FPutC returns <A HREF="$$LINK(files.h/FileStatusEnum)">FS_OK</A> if successful, <A HREF="$$LINK(files.h/FileStatusEnum)">FS_ERROR</A> if the file is not opened for write
mode or <A HREF="$$LINK(files.h/FileStatusEnum)">FS_MEMORY</A> if the system is out of memory.
<BR><BR>
<B>Note:</B> Any error will cause the file status to be set to <A HREF="$$LINK(files.h/FileStatusEnum)">FS_ERROR</A> so that multiple
writes may be performed without checking the return status as long as an
<A HREF="$$LINK(files.h/TIOS_FStatus)">FStatus</A> is done at the end to make sure all of the writes were successful.
<BR><BR>
This routine may cause heap compression.

[References]
Out=alloc.h/HeapRealloc, alloc.h/HeapSize
In=files.h/TIOS_FWrite: FWrite
