STdecDfrac


Routine

int STdecDfrac (const char String[], double *Dval1, double *Dval2)

Purpose

Decode a ratio specification of two double values

Description

This routine decodes a string specifying a ratio of double values. The ratio is specified in the form "V" or "V1/V2", for example "-23.1 / 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 STdecRfrac
Error status, 0 for no error, 1 for error
-> const char String[]
Input string
<- double *Dval1
First value
<- double *Dval2
Second value

Author / revision

P. Kabal / Revision 1.7 2003/05/09

See Also

STdecIfrac


Main Index libtsp