RE: poke4 won't accept my 32bit values
- Posted by Chris Bensler <bensler at mailops.com> Mar 19, 2001
- 496 views
Oh yeah,, Why would my demos be reporting one higher? The info I gave was straight from the EX.ERR Chris Robert Craig wrote: > Chris Bensler writes: > > test = 4294967296 <<<<<<<<< this is the value being > > poked... (#FFFFFFFF) > > Not quite.... > > #FFFFFFFF = 4294967295 > > Your "test" variable is 1 higher than > the maximum 32-bit (unsigned) integer, > so poke4() gives you an error. > > To get the low-order 32-bits you could do: > > test = remainder(test, 4294967296) > > which in this case is 0. In general you'll get > the low-order 32-bits, which is what a C program would > give you, since C doesn't worry about integer overflow. > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > >