www.pudn.com > mat_lib.zip > MAT_V2D.ABR
ABREVIATED USERS MANUAL
The following function description is an example of the function writeups
provided in the users manual. The remaining descriptive writeups are very
brief but do describe the syntax and basic use of each function. Regular
users of this library will find the manual quite helpful.
----------------------------------------------------------------------------
mfput
----------------------------------------------------------------------------
Name mfput - Outputs selected columns from floating point array
in formatted pages with column titles
Usage void mfput ( FILE *FN,struct fmat *mtx,char hdr_lst[],
char sel_lst[], unsigned ChPrLn,unsigned FldPrLn,unsigned
DcPlc);
Prototype in mat_v2b.h
Description This function outputs selected columns of the floating
point array mtx to FN, which has previously been opened
for text write operations (see mfcreat).
hdr_lst[] is a list of abbreviated titles (tokens
delimited by spaces) for each column in mtx. sel_lst[] is
list of matching abbreviated titles for the columns which
are to be output. ChPrLn is the maximum number of
characters per line desired. FldPrLn is the number of
values which are desired on each line, and DcPlc specifies
the number of decimal places desired in the output values.
The columns to be output are selected by performing a
token by token comparison of hdr_lst and sel_lst. If an
abreviated title token from sel_lst matches a title token
in hdr_lst, that column will be output. The selected
columns of mtx are output in tabular form without page
breaks with the abbreviated column titles enclosed in
braces at the beginning of the table.
If the numeric output format is not possible with the
number of decimal places (DcPlc) and fields per line
(FldPrLn) specified the function will generate an error
message and terminate execution.
Return value The value of one is returned on completion.
Source code in fmx1_v2b.c
See also mfpgput,mtput
Example /* matrix
[ 1 2 3 4
4 5 6 7
7 8 9 10 ]
*/
flcreat("DATA.OUT",FN);
mfput(FN,matrix, "COL_A COL_B COL_C COL_D",
"COL_B COL_D",20,2,3);
/* The following output will be directed to FN
{ DATA.OUT 12/1/88 }
{
COL_B COL_D
}
2.000 4.000
5.000 7.000
8.000 10.000
ABREVIATED DESCRIPTIONS
----------------------------------------------------------------------------
all
----------------------------------------------------------------------------
Name all - Macro to loop through an entire array
Usage macro as follows: all(mx,rw,cl)
for (rw=0; rw