From: | torrelli |
Date: | 12 Jul 2000 at 14:58:54 |
Subject: | Re: atof ( ) |
> Hi! I'm doing some porting from windows to Amiga and I've stumbled across a
> function called atof() (ascii to float I suppose) that I can't find
> anywhere. I'm using StormC 3.0 (from dev cd 2.1) and Golded (which
> highlights the word atof, so it ought be somewhere..)
> please help
>
>
atof should take an ascii string and return a double (faux ami :)
Dunna stormC, but if you don't have atof, you might use sscanf like that:
double my_atof( char *s )
{
double res=0.0;
sscanf( s, "%lf", &res );
return res;
}
or eventually check if you've got a strtod function..
Hope it helps.
Phil.
------------------------------------------------------------------------
Free, Unlimited Calls Anywhere!
Visit Firetalk.com - click below.
http://click.egroups.com/1/5479/1/_/451227/_/963407175/
------------------------------------------------------------------------