The description under the 'let' command says that negative numbers and parentheses are not supported and that the parsing works strictly from left to right.
Comment 1: The negative arithmetic actually works if you write the equation like:
temp = 0-12 + 15
The answer comes out 3, which is right. Since this works already, how about including the negate feature when the first item is preceded by a minus sign?
Comment 2: Even though you don't support parentheses when parsing, it would be really helpful if you included precedence, wherein the * and / are performed before the + or -.
It took me a while to figure out that
temp = 12 - 3*i
is parsed as (12 - 3)*i rather than as 12 - (3*i) which is what you get if you run it on VB.
Just food for thought. Keep up the good work.
Jim
Â
Comment 1: The negative arithmetic actually works if you write the equation like:
temp = 0-12 + 15
The answer comes out 3, which is right. Since this works already, how about including the negate feature when the first item is preceded by a minus sign?
Comment 2: Even though you don't support parentheses when parsing, it would be really helpful if you included precedence, wherein the * and / are performed before the + or -.
It took me a while to figure out that
temp = 12 - 3*i
is parsed as (12 - 3)*i rather than as 12 - (3*i) which is what you get if you run it on VB.
Just food for thought. Keep up the good work.
Jim
Â