RE: poke4 won't accept my 32bit values
- Posted by Al Getz <Xaxo at aol.com> Mar 21, 2001
- 516 views
Hi again Chris, Chris Bensler wrote: > I discovered something else... > > This bug only happens when poking HEX values. > If I try.. > poke4(pvCube+16 ,4294967295) > > Guess what? It works!??? > > Gotta be an EU problem somehow.. > > Chris Hmmm, now it sounds like whatever converts "#n" formats into atoms for large hex numbers is screwing up the conversion. That would also explain how #FFFFFFFF gets converted into #100000000 as Derek was saying. Another test would be to create the number by adding two values together that do convert correctly, such as: n=#FFFF0000+#FFFF to create #FFFFFFFF or build the number up separately: n1=#FFFF0000 n2=#FFFF n=n1+n2 If its always larger numbers, you could try: n1=#80000000 --do high bit separate n2=#7FFFFFFF n=n1+n2 If these last two methods work, i would assume the "#n" conversion routine was suspect for n greater than some large value. Of course i have no idea why, without seeing all the code. Q. Could it be its trying to convert to a negative signed atom instead of a large positive atom, interpreting the high bit as a sign bit? A. Not if it really does convert #FFFFFFFF to #100000000 (which im not sure how #100000000 was verified). In any case, i hope you find the problem, and its solution. --Al