Implement support for bare vars by math

This change allows you to type `math x + 3` rather than `math $x + 3`.

Another step to resolving issue #3157.
This commit is contained in:
Kurtis Rader
2017-08-23 20:38:40 -07:00
parent d10decabda
commit c95b9f06e1
4 changed files with 77 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
####################
# Validate basic expressions
####################
# Validate how bare variables in an epxression are handled

View File

@@ -1,3 +1,4 @@
logmsg Validate basic expressions
math 3 / 2
math 10/6
math -s0 10 / 6
@@ -12,3 +13,12 @@ math '-2 * -2'
math 5 \* -2
math -- -4 / 2
math -- '-4 * 2'
logmsg Validate how bare variables in an epxression are handled
math x + 1
set x 1
math x + 1
set x 3
set y 1.5
math '-x * y'
math -s1 '-x * y'

View File

@@ -1,3 +1,6 @@
####################
# Validate basic expressions
1
1
1
@@ -12,3 +15,10 @@
-10
-2
-8
####################
# Validate how bare variables in an epxression are handled
1
2
-4
-4.5