Maths error


Author Message
BobDevries

Senior Member

Joined: 08/06/2011
Location: Australia
Posts: 266
Posted: 04:58am 27 Jun 2011      

Hi gang,

Can anyone tell me the limitations of the MOD operator? I have the following lines:

90 upper = addr \ 65536
100 lower = addr MOD 65536

The value of addr is 2.68442e+09 which is within MMBasic's number range, however, I get an error: "Number too large for an integer". It would seem that the

What gives?

What I'm trying to do is manipulate numbers to allow me to PEEK and POKE to screen RAM. The PEEK and POKE commands require that the address be split into HIWORD and LOWORD 32-bit numbers.

regards,


hmmm, the manual says that the maximum integer is 16777100, which is clearly not large enough to hold the screen address. Can anyone think of a workaround?

Bob Devries
Dalby, QLD, Australia