delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/28/16:10:36

From: invalid AT erehwon DOT invalid (Graaagh the Mighty)
Newsgroups: comp.os.msdos.djgpp,comp.lang.c++,comp.lang.c
Subject: Re: DJGPP reserves wrong int size
Organization: Low Charisma Anonymous
Message-ID: <3b3b50b2.214041374@news.primus.ca>
References: <9dde68b7 DOT 0106241053 DOT 2a385311 AT posting DOT google DOT com> <3B36A44F DOT 28AB8846 AT iedu DOT com> <3b37c7a3$0$15028$cc9e4d1f AT news DOT dial DOT pipex DOT com> <3B37D3FF DOT 6FF43454 AT acm DOT org> <2zQZ6.30947$Mf5 DOT 7551891 AT news3 DOT rdc1 DOT on DOT home DOT com> <3B37E46D DOT 18020A4B AT acm DOT org> <izRZ6.31082$Mf5 DOT 7689174 AT news3 DOT rdc1 DOT on DOT home DOT com> <3b388eba$0$15026$cc9e4d1f AT news DOT dial DOT pipex DOT com>
X-Newsreader: Forte Free Agent 1.11/32.235
Lines: 47
Date: Thu, 28 Jun 2001 15:53:59 GMT
NNTP-Posting-Host: 207.176.153.221
X-Complaints-To: news AT primus DOT ca
X-Trace: news2.tor.primus.ca 993743700 207.176.153.221 (Thu, 28 Jun 2001 11:55:00 EDT)
NNTP-Posting-Date: Thu, 28 Jun 2001 11:55:00 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

As an aside, perhaps it would be helpful to be a tad more observant
before jumping to the conclusion that someone is ignorant of hex, or
anything else for that matter. The example just discussed is
instructive.


Sure, it looks like he misread an 0x18 as "18 bytes". Firstly, has any
of you never made a mental slipup like that, especially if
tired/frustrated? You look for a number you're expecting to see, see
something else, and go "WHY THE HELL IS IT 18 BYTES?" Maybe you
misread it as decimal; maybe you were actually still thinking in hex
when you wrote it. Could be an honest mistake by someone non-ignorant.

Of course, this alone doesn't suggest much either way. But then you'll
notice that his sample code had a hex constant in it. Would be be
putting 0xfoo in his code if he didn't know jack about hex? One doubts
this. Moreover, and even more telling, he put 0x12345678 -- eight hex
digits, no more, no less -- in an assignment to an int that he knew
would (with the particular compiler involved) be 32 bits. This
strongly suggests that he knows that each digit above specifies 4 bits
in the result. Of course, a hex virgin might happen to write something
like that, but equally as likely he'd write 0x145 or 0x5727598291...
also, the choice of digits indicates the author was particularly
conscious that there were eight digits, not nine and not seven, nor
any other number, indicating further that he recognized the
significance of exactly eight hex digits -- namely, that it specifies
an even 32 bits, which was the size of the data type he assigned it
to.

So hopefully, some people here will look a little more closely at a
posting before jumping to a conclusion about its author. Little pieces
of evidence often add up to useful information that may belie the
initial, and possibly deceptive, impression...

I do not mean to flame anyone here, or lay blame, e.g. "You should
have looked at his other use of hex you idiot!" or anything of that
sort. I merely wish to show that this instance was, in principle,
avoidable, and by looking closely we may learn how a similar future
incident might be averted. This one can't now -- it's water under the
bridge. The next one is what deserves consideration now. Flames and
recriminations will, of course, lead nowhere; careful observation and
consideration however might prevent problems in the future.
-- 
Bill Gates: "No computer will ever need more than 640K of RAM." -- 1980
"There's nobody getting rich writing software that I know of." -- 1980
"This antitrust thing will blow over." -- 1998
Combine neo, an underscore, and one thousand sixty-one to make my hotmail addy.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019