Re: [Circle] [circle][code][races]

From: Chris Ryan (drizzt@visi.net)
Date: 11/08/96


On Fri, 8 Nov 1996, Dan Johnson wrote:

> On  8 Nov 96 at 16:53, Scott AJ wrote:
> 
> > I think it might have something to do with the left shift count being
> > greater than or equal to the width of type.
> > :)
> > 
> > Amoeba
>   Gee...Thanks for the great tip....Now can anyone really help me 
> on this matter?
>   Oh..btw...If your not gonna give an intellegent answer "Amoeba"..then 
> dont answer at all. I simply asked for some help, I don't need 
> sarcastic remarcs...they really aren't that helpful believe it or not 
> :)
> -VOLAR-

	ok let me try to explain. If you have an int (which i believ is
what the race is) it is 32bits long. 1 << 0 is equal to
00000000000000000000000000000001 and 1 << 1 is equal to
00000000000000000000000000000010 ect... so if you have 1 << 32 you end
with (1)00000000000000000000000000000000 the (1) is out of the range of
the value so you end up with 0. the easiest you start with 0 and you have
32 bits so the highest you can go is (1 << 31) anything above this will
give you the error you posted. so what you need to do is to go back and
declare a variable that can hold more than 32 bits. I hope this helps. I
can't think of any variables bigger than this off the top of my head but
if you look in help files or a book you should be able to find one.

Christopher M. Ryan
drizzt@visi.net
http://www.visi.net/~drizzt/

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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