Article View: comp.sys.powerpc
Article #3255Re: Debate: PowerMac "trounces" Pentium....???
From: Dan Pop
Date: Sun, 18 Feb 1996 01:05
Date: Sun, 18 Feb 1996 01:05
51 lines
2516 bytes
2516 bytes
In <4g2ibh$dj7@meaddata.lexis-nexis.com> christw@meaddata.com (Christopher C. Wood) writes:
>In article <danpop.824406631@rscernix>, danpop@mail.cern.ch (Dan Pop) writes:
>|> In <4ftn81$5sv@meaddata.lexis-nexis.com> christw@meaddata.com (Christopher C. Wood) writes:
>
>|> Only a fool could think something like this. atoi (which is a
>|> standard C function, no double quotes required) converts a string
>|> to an int, as its name says: Ascii-TO-Int. Got it?
>
>Yup. Guess what? On two of the most popular unix platforms, Solaris
>2.3 and HPUX 9, the function is _not_ atoi(). That's why I asked.
Don't be idiot. atoi() is a standard C function and it is available
both on Solaris and HPUX (as well as anywhere else). Of course, this
function doesn't solve your problem.
If you still have doubts (and don't trust man pages either) try to
compile this program:
#include <stdio.h>
#include <stdlib.h>
main()
{
printf("%d\n", atoi("123"));
return 0;
}
If you find one platform where this program won't compile or won't work,
please let me know.
>|> This is precisely why clever programmers choose the ANSI C solution
>|> whenever possible (sprintf in this case).
>
>sprintf() means linking in the whole stdio library; 50K for a 150-byte
>function. Can you say code bloat?
No, I cannot. I've already explained the reasons in a previous article.
>atoi() is implemented in _neither_ Solaris 2.3 nor HPUX 9.
You obviously don't know what you're talking about. You could, at least,
have typed "man atoi" before making an ass of yourself by posting such
a stupid statement.
Dan
--
Dan Pop
CERN, CN Division
Email: danpop@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID:
<danpop.824605525@rscernix>Path:
arc1-ca.pugleaf.net!rcp6.elan.af.mil!rscernix!danpopReferences:
<nevin-1202960529130001@150.135.1.79> <9602121654.AA02634@ues5.cern.ch> <4fqdta$rhh@meaddata.lexis-nexis.com> <stephenkDMqrH6.Bo5@netcom.com> <4ftn81$5sv@meaddata.lexis-nexis.com> <danpop.824406631@rscernix> <4g2ibh$dj7@meaddata.lexis-nexis.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rcp6.elan.af.mil!rscernix!danpop From: danpop@mail.cern.ch (Dan Pop) Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel Subject: Re: Debate: PowerMac "trounces" Pentium....??? Date: 18 Feb 96 01:05:25 GMT Organization: CERN European Lab for Particle Physics Message-ID: <danpop.824605525@rscernix> References: <nevin-1202960529130001@150.135.1.79> <9602121654.AA02634@ues5.cern.ch> <4fqdta$rhh@meaddata.lexis-nexis.com> <stephenkDMqrH6.Bo5@netcom.com> <4ftn81$5sv@meaddata.lexis-nexis.com> <danpop.824406631@rscernix> <4g2ibh$dj7@meaddata.lexis-nexis.com> NNTP-Posting-Host: ues5.cern.ch X-Newsreader: NN version 6.5.0 #7 (NOV)