Navigation

Operators and Keywords

Function List:

C++ API

: fprintf (fid, template, …)
: fprintf (template, …)
: numbytes = fprintf (…)

This function is equivalent to printf, except that the output is written to the file descriptor fid instead of stdout.

If fid is omitted, the output is written to stdout making the function exactly equivalent to printf.

The optional output returns the number of bytes written to the file.

Implementation Note: For compatibility with MATLAB, escape sequences in the template string (e.g., "\n" => newline) are expanded even when the template string is defined with single quotes.

See also: fputs, fdisp, fwrite, fscanf, printf, sprintf, fopen.

Package: octave