33 const char *Str = *StrPtr;
39 return (*Str !=
'\0');
55 int ParseNumber(
double *Number,
const char **StrPtr,
int FloatAllowed)
57 const char *Str = *StrPtr;
58 double Accum = 0, Div = 1, Exponent = 0;
59 int Sign = 1, ExponentSign = 1;
81 while(isdigit(c = *(++Str)))
82 Accum = 10*Accum + (c -
'0');
90 while(isdigit(c = *(++Str)))
93 Accum += (c -
'0')/Div;
97 if(c ==
'e' || c ==
'E')
113 if(isdigit(c = *Str))
117 while(isdigit(c = *(++Str)))
118 Exponent = 10*Exponent + (c -
'0');
120 Exponent *= ExponentSign;
121 Accum = Accum * pow(10, Exponent);
127 *Number = Sign*Accum;