MF_fprint MD_fprint ME_fprint
MCF_fprint MCD_fprint MCE_fprint
MI_fprintMBI_fprintMSI_fprintMLI_fprintMQI_fprint
MU_fprintMUB_fprintMUS_fprintMUL_fprintMUQ_fprint
Functionprint a matrix in ASCII format to a stream
Syntax C/C++#include <MFstd.h>
void MF_fprint( FILE *stream, fMatrix MA, ui ht, ui len, unsigned linewidth );
C++ MatObj#include <OptiVec.h>
void matrix<T>::fprint( FILE *stream, unsigned linewidth );
Pascal/Delphiuses MFstd;
{Delphi version:}
  procedure MF_fprint( var Stream:TextFile; MA:fMatrix; ht, len:UIntSize; linewidth:UInt );
{Turbo Pascal version:}
  procedure MF_fprint( var Stream:Text; MA:fMatrix; ht, len:UIntSize; linewidth:UInt );
DescriptionThe matrix MA is written to stream. Each line corresponds to one row of the matrix. The lines are numbered. If the specified linewidth is too small to write all columns, rows are cut off.
Printing starts always with a new line. This may lead to an empty line at the beginning. Especially the first line of a file is reserved for a possible headline.
Cartesian complex numbers are printed in braces, with the real and imaginary parts separated by a komma: {Re, Im}.

In contrast to MF_write, it is not possible to override the automatic choice of the format used for printing. The number of digits per element is determined by the available space, which depends in turn on the parameters len and linewidth.

Error handlingif len exceeds the maximum number of entries possible for the linewidth chosen, an error message "Cannot use requested format (too many entries per line)!" is generated; in this case, the program truncates the rows at the maximum number of columns possible.
See alsoMF_cprint,   chapter 14

MatrixLib Table of Contents  OptiVec home