lhartikk / ArnoldC

Arnold Schwarzenegger based programming language
lhartikk.github.io/ArnoldC/
Apache License 2.0
6.71k stars 289 forks source link

ReadInteger parses to 32-bit, not 16 #101

Open jsimonian opened 9 years ago

jsimonian commented 9 years ago

Not an issue, but some useful magic: The command "I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY" parses input to a 32 bit integer, not a 16 bit as described in the wiki. Moreover, performing operations on values created by parsing can be used to generate new 32 bit integers.

That is, if you were to parse 100000 as a value Val, define a new value Val2, set Val2 equal to Val * 2, and then print Val2, the value printed would be 200000, whereas simply defining a new value Val3 as 200000 and then printing Val3 will result in an integer overflow (as expected) and will print 3392. (Example)