| |||
| Home > RealView Debugger Predefined Macros > Alphabetical predefined macro reference > fputc | |||
Writes a byte to a file.
int fputc (byte,fileid) intbyte; intfileid;
where:
byteThe byte to be written.
fileidThe ID number of the file where the next byte is
to be written. This must be a user-defined .
See Window and file numbers for details.fileid
This macro writes the contents of the next byte to a file.
You must define the identity of the file with either the fopen macro
(see fopen on fopen) or the FOPEN command
(see FOPEN on FOPEN). You can also specify the Standard I/O
window (20) as output.
The file written to must be opened in write mode, for example:
fopen(100,”c:\\myfiles\\data_out.txt”,”w”).
The example on Example also
shows you how to use fputc in a macro.