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
|
<HTML>
<HEAD>
<TITLE>TSP (libtsp/ST) - STdecIfrac</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>STdecIfrac</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
int STdecIfrac (const char String[], int *Ival1, int *Ival2)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Decode a ratio specification of two integer values
</DL>
<H4>Description</H4>
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.
<H4>Parameters</H4>
<DL>
<DT>
<- int STdecIfrac
<DD>
Error status, 0 for no error, 1 for error
<DT>
-> const char String[]
<DD>
Input string
<DT>
<- int *Ival1
<DD>
First value
<DT>
<- int *Ival2
<DD>
Second value
</DL>
<H4>Author / revision</H4>
P. Kabal Copyright (C) 1997
/ Revision 1.4 1997/10/31
<H4>See Also</H4>
<A HREF="STdecDfrac.html">STdecDfrac</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>
|