3.2.12. fputc

Writes a byte to a file.

Syntax

int fputc (byte,fileid)
int byte;
int fileid; 

where:

byte

The byte to be written.

fileid

The ID number of the file where the next byte is to be written. This must be a user-defined fileid.

Description

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 or the FOPEN command.

Return value

int

Not used.

Rules

The file written to must be opened in write mode, for example:

fopen(100,"c:\\myfiles\\data_out.txt","w").

Example

Example shows you how to use fputc in a macro.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111