STdecIfrac
Routine
-
int STdecIfrac (const char String[], int *Ival1, int *Ival2)
Purpose
-
Decode a ratio specification of two integer values
Description
This routine decodes a string specifying a ratio of integer values. The
ratio is specified in the form "V" or "V1/V2", for example "-23 / 45".
Optional white-space (as defined by isspace) can surround the values. For
the case of a single value V, this is equivalent to the ratio "V/1". If an
error is encountered, neither output value is set.
Parameters
-
<- int STdecIfrac
-
Error status, 0 for no error, 1 for error
-
-> const char String[]
-
Input string
-
<- int *Ival1
-
First value
-
<- int *Ival2
-
Second value
Author / revision
P. Kabal
/ Revision 1.8 2003/05/09
See Also
STdecDfrac
Main Index libtsp