1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
.TH STdecNfloat 3tsp "TSP (libtsp/ST)"
.SH Routine
.in +4n
.ti -4n
int STdecNfloat (const char String[], int Nmin, int Nmax, float Fval[],
int *N)
.in -4n
.SH Purpose
.in +4n
.ti -4n
Decode float values (variable number)
.in -4n
.SH Description
This routine decodes a string containing numeric data. Multiple data items
data items in the string are separated by commas or white-space (as defined
by the isspace routine). The decoded data is stored as float values. If
the number of data values in the string is less than a given minimum number
or a decoding error is detected, an error message is printed and an error
indication is returned. A warning messages is printed if extra data follows
the requested values (this data is ignored).
.SH Parameters
.in +4n
.ti -4n
<- int STdecNfloat
.br
Error status,
.ft CW
.nf
.ne 3
0 - no error
1 - error, too few values or data format error
2 - warning, data values too large or too small
.fi
.ft P
.ti -4n
-> const char String[]
.br
Input string
.ti -4n
-> int Nmin
.br
Minimum number of values to be read (may be zero)
.ti -4n
-> int Nmax
.br
Maximum number of values to be read
.ti -4n
<- float Fval[]
.br
Array of Nmax elements used to store the decoded values. Only the first
N values are modified.
.ti -4n
<- int *N
.br
Actual number of values decoded. In the case of an error, N indicates
the number of values successfully decoded. In that case, N may be less
than Nmin.
.in -4n
.SH Author / revision
P. Kabal Copyright (C) 1997
/ Revision 1.20 1997/10/13
.SH See Also
STdec1float,
STdecNdouble,
STdecNint,
STdecNlong,
libtsp
|