Article View: comp.sys.powerpc
Article #3172Re: Debate: PowerMac "trounces" Pentium....???
From: Jim Trigg
Date: Thu, 22 Feb 1996 17:53
Date: Thu, 22 Feb 1996 17:53
37 lines
2543 bytes
2543 bytes
In article <4g2i5q$dj7@meaddata.lexis-nexis.com> christw@meaddata.com (Christopher C. Wood) writes: > In article <stephenkDMuGux.Iot@netcom.com>, stephenk@netcom.com > (Stephen Knilans) writes: > |> If you write code to directly convert a binary number to a human > |> readable version, and find that it won't work the same on all > |> processors, this is NOT the fault of C!!!!!!!!!!! It is because > |> MANY processors are different! > |> The libraries are there for a REASON! There are possibly HUNDREDS > |> of number formats, and it is very difficult to provide for all. > Look, I've shown a bunch of things with this thread. _none_ of the > respondants pointed out that there is a "standard" library call to do > this: itoa(). As documented in K&R (I'd cite page numbers, but I > don't have it at this desk.) As _assumed_ in Stroustrup, 2nd ed. > Guess what? This "standard" library call, in actual practice, isn't > standard. Each platform has its own version. One version is even > wrong in the manufacturers on-line documentation. Is this a fault > with the "Standard" for C or C++ libraries? Or just the > implementations. You tell me. The "documentation" in K&R is on page 64 (2nd ed.), where they show how to write it. They never claim it is part of any library. The code that they provide is system-independent. (It does depend on one function that they wrote earlier in the book, reverse() which reverses a string in place.) It is not even library-dependent. Also, in regard to your claim that linking in sprintf links in the full stdio library, well, atoi (and relatives) links in the full stdlib library. Unless, of course, you have an intelligent linker which only brings in symbols that are actually referenced. Just a Thought, Jim Trigg
Technical Details
Message-ID:
<9lspg3xn54.fsf@marks.jyacc.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!jyacc!usenetReferences:
<4fqdta$rhh@meaddata.lexis-nexis.com> <danpop.824303108@rscernix> <4fvmmm$o5j@meaddata.lexis-nexis.com> <stephenkDMuGux.Iot@netcom.com> <4g2i5q$dj7@meaddata.lexis-nexis.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel Path: arc1-ca.pugleaf.net!in1.uu.net!jyacc!usenet From: jtrigg@marks.jyacc.com (Jim Trigg) Subject: Re: Debate: PowerMac "trounces" Pentium....??? In-Reply-To: christw@meaddata.com's message of 16 Feb 1996 18:24:58 GMT X-Nntp-Posting-Host: marks Message-ID: <9lspg3xn54.fsf@marks.jyacc.com> Sender: jtrigg@marks.jyacc.com Organization: JYACC, Inc. X-Newsreader: Gnus v5.1 References: <4fqdta$rhh@meaddata.lexis-nexis.com> <danpop.824303108@rscernix> <4fvmmm$o5j@meaddata.lexis-nexis.com> <stephenkDMuGux.Iot@netcom.com> <4g2i5q$dj7@meaddata.lexis-nexis.com> Date: Thu, 22 Feb 1996 17:53:26 GMT