C (66/257)

From:
Date:06 Feb 2001 at 15:38:09
Subject:Re: ObtainBestPen Again

On Tue, 6 Feb 2001, Gunther Nikl wrote:

> On Tue, Feb 06, 2001 at 08:33:28AM -0500, Gregory Roberts II wrote:
> > printf("%d\n", (LONG)mapping[4]);
>
> "%d" denotes an _int_ value.
>
> Gunther
>

You're right, of course. The point being, %d expects a 32-bit value
(since int is 32 bit under most Amiga compilers), whereas mapping[4]
contains a 16-bit value, thereby (potentially) causing printf to display
the wrong thing. As it happens (and I'm sure you know), under most Amiga
compilers int == LONG (i.e. signed, 32-bit value), so this should be ok.
But again, you are absolutely correct. That's what I get for firing off
e-mail before I've had my morning caffiene. :-)

Thanks for the correction!

Greg



------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/981470652/
---------------------------------------------------------------------_->