TSP (libtsp/ST) - STdecDfrac

## 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 Copyright (C) 1997 / Revision 1.4 1997/10/31

#### See Also

STdecIfrac

Main Index libtsp