Re: Zone limits

From: William L. Garces (wlgarces@alf.uccs.edu)
Date: 11/24/95


On Thu, 23 Nov 1995, William Karp wrote:

> > 
> > Now a question for you guys that have been coding Circle for a while.
> > I would like to change this value to a signed int which would be a 32
> > bit value. 
> 
> Well, your on the right track, a signed int will give you a little over 
> 32000 above and below zero.  if you change it to an unsigned int, then 
> you can go up to a little over 65000 (positive only).  but as long as the 
> compiler and such will handle it, (and as long as your doing the work) 
> why not change it to something like a long (+-)2 billion, 147 million, or 
> if ou wanted to get really crazy, a unsigned long(+) 4 billion 294 million.
> 
> 
> I've never tried to change the max size of the rooms, so I don't know 
> what difficulties you'd be getting into, but if you go over 32000, then 
> 65000 doesn't seem like it gives you that much more room.  But be 
> careful, because using a long is going to let you eat much more memory 
> (twice as much wherever you declare any values) versus using an int.
> 
> Just to let you know, an int, and unsigned int is both 16 bit 
> and the long is the 32bit number you were referring to.
> 

Well that's what I would have thought it was.  All the PC compilers that
I have used so far (Borland + Topspeed) have int as 16bit. But when
I was looking up the size of short int in limits.h, int was right
next it. And the limit for signed int was +/- 2billion or so. I believe
the size of int is compiler specific, not platform specific. 

-Will



This archive was generated by hypermail 2b30 : 12/07/00 PST