Re: how to pass float value from argv?
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Sat, 09 May 2009 18:38:04 -0700
Ian Collins <ian-news@xxxxxxxxxxx> writes:
Richard Heathfield wrote:
Sunny said:
<snip>
It would be better to try not to use atoi()/atof().
Agreed.
If you read
the C manual. It clearly says that both atoi() and atof() has been
deprecated by strtol() and strtod()
Which C manual? If you mean the Standard, C&V please. If you mean
the man pages, mine don't say any such thing.
Some do, the (Open)Solaris page says:
Calls to atoi() and atol() might be faster than correspond-
ing calls to strtol(), and calls to atoll() might be faster
than corresponding calls to strtoll(). However, applications
should not use the atoi(), atol(), or atoll() functions
unless they know the value represented by the argument will
be in range for the corresponding result type.
Yes, but that doesn't say they're deprecated.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- References:
- how to pass float value from argv?
- From: miloody
- Re: how to pass float value from argv?
- From: Willem
- Re: how to pass float value from argv?
- From: Sunny
- Re: how to pass float value from argv?
- From: Richard Heathfield
- Re: how to pass float value from argv?
- From: Ian Collins
- how to pass float value from argv?
- Prev by Date: Re: how to pass float value from argv?
- Next by Date: Re: More Net Nanny
- Previous by thread: Re: how to pass float value from argv?
- Next by thread: Re: how to pass float value from argv?
- Index(es):
Relevant Pages
|