Re: ver 4.0 found the BUG in WIN98 code FOUND PROBLEM

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
bernie said...

Matt: I see what the problem is; It is caused by the dval.
The #80000000 is the limit of a long integer.
What we need in Euphoria is a sprintf with %u specifier parameter.

I don't think that's the problem. Because if the number were that big, euphoria would store it as a double. For euphoria code, there's not really such thing as signed and unsigned. Everything is signed, and and atom is automatically promoted to a double if the magnitude grows too much.

What happens if you try:

   atom a = n[$] 
   print(1, "a %d\n", a ) 
   print(1, "a %d\n", {a} ) 
   ? {n[$]} 
   ? {a} 

Matt:
I actually used rtfatal to sprintf a buffer and I looked at dval
when the program crashed and the the dval was #80000000.
That is -2147483648 which is the the lower limit of long(signed).
It does not return that on win2000 because the long integer may have
different limits. And ver 3.11 may work because the compiled code
never uses memory at those large memory values.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu