The long int thing is tricky... I know what you mean about negative numbers.
Espruino stores ints in a normal 32 bit value, but anything larger in a double. I guess it's unlikely to cause problems, but code would actually end up getting an int half the time, and a double the other half (where the number got too big). I guess I could do it as a float between 0 and 1 again, but often I think it'd be quite handy to be able to get at the raw integer.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Great - thanks!
The long int thing is tricky... I know what you mean about negative numbers.
Espruino stores ints in a normal 32 bit value, but anything larger in a double. I guess it's unlikely to cause problems, but code would actually end up getting an int half the time, and a double the other half (where the number got too big). I guess I could do it as a float between 0 and 1 again, but often I think it'd be quite handy to be able to get at the raw integer.