Hi!
Are Longints possible under bmx?
I have to calculate large numbers so int probably won't do... :/
Grisu
Are Longints possible under bmx?
I have to calculate large numbers so int probably won't do... :/
Grisu
Description Syntax Minimum Value Maximum Value 8 bit unsigned integer Byte 0 255 16 bit unsigned integer Short 0 65535 32 bit signed integer Int -2^31 +2^31-1 64 bit signed integer Long -2^63 +2^63-1 32 bit floating point Float (+/-)10^-38 (+/-)10^38 64 bit floating point Double (+/-)10^-308 (+/-)10^308Many blessings be upon BMax for Longs and Doubles. :)
Dbl! = 1.23456789123 Print Dblyou get a bad result: 1.2345678806304932 because the 1.23456789123 is interpreted as a mere Float. To get the correct result, you need to specify that the number is a Double by using:
Dbl! = 1.23456789123! Print Dbl 'or Dbl! = 1.23456789123:Double Print Dblwhich gives: 1.2345678912300000
Lng%% = 123456789123%% Print LngInstead you must use:
Lng%% = 123456789123456789:Long Print Lngwhich gives the correct result (and don't try with nothing on the end like "Lng%% = 123456789123456789" or it'll be interpreted as an Int and give you "-1395630315").