RE: poke4 won't accept my 32bit values

new topic     » goto parent     » topic index » view thread      » older message » newer message

When I do the exact same test in Todds Demo, it returns the proper 
value!? What the ....

Why would my changing the execution of WinMain affect this?

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
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu