| |||
Home > RealView Debugger Predefined Macros > Alphabetical predefined macro reference > fwrite |
Writes the contents of a buffer to a file or window.
unsigned long fwrite (buffer, count, size, outputid) void *buffer; unsigned count; unsigned size; int outputid;
where:
buffer
Specifies the start of the area from which the data is read.
count
Specifies the number of elements.
size
Specifies the size of each element in bytes.
outputid
The
ID number of a window or file where the data is to be written. This
must be a user-defined
or windowid
.fileid
This macro writes the contents of a buffer to a file or window.
You must define the identity of the file with either the fopen
macro
or the FOPEN command.
If you are writing to a file, it 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 fwrite
in a macro.