Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > itoa, atoi - confused

Reply
Thread Tools

itoa, atoi - confused

 
 
Ben Pfaff
Guest
Posts: n/a
 
      09-27-2005
"Malcolm" <(E-Mail Removed)> writes:

> "rayw" <(E-Mail Removed)> wrote
>>
>> So, I was wondering what was wrong with both itoa and atoi etc (and what's
>> replaced them).
>>

> The name isn't very logical, since it implies "integer to ASCII" and C
> doesn't guarantee ASCII will be the execution set.


Is that what the "a" stands for? I'd always assumed it was short
for "array of character".
--
"Some people *are* arrogant, and others read the FAQ."
--Chris Dollin
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      09-27-2005
Ben Pfaff <(E-Mail Removed)> writes:
> "Malcolm" <(E-Mail Removed)> writes:
>
>> "rayw" <(E-Mail Removed)> wrote
>>>
>>> So, I was wondering what was wrong with both itoa and atoi etc (and what's
>>> replaced them).
>>>

>> The name isn't very logical, since it implies "integer to ASCII" and C
>> doesn't guarantee ASCII will be the execution set.

>
> Is that what the "a" stands for? I'd always assumed it was short
> for "array of character".


Then "itos", for integer to string, would have made more sense.

I suspect that when itoa and atoi were first written, there was a de
facto guarantee of ASCII (though C was ported to EBCDIC systems fairly
early on).

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: atoi - please help Neil Vice C++ 0 04-01-2004 07:55 AM
atoi() Christopher Benson-Manica C++ 16 01-18-2004 11:28 PM
atoi: stringstream or old C sprintf function Mike Chirico C++ 2 11-19-2003 03:59 PM
java equivalent function of c atoi() function lonelyplanet999 Java 8 11-03-2003 01:07 AM
int to char[]: What's the reciprocal of std::atoi? Magig Boatman C++ 1 07-11-2003 07:00 PM



Advertisments