|
Dakina Novice
Joined: 22 Apr 2011 Posts: 36 Location: Colorado
|
Posted: Fri Oct 14, 2011 6:00 am
Where do I find how to add 2 variables together? |
Hi, Im trying to figure out how to add variable1+variable2, and output the total. Where can I find how to do this? I find the "tutorial" and help files very hard to navigate
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 14, 2011 12:50 pm |
It may be hard to find in the help files because it is so trivial. The way to add the values of variables is: (@variable1 + @variable2)
So you can do something like:
$total = (@variable1 + @variable2)
#SHOW $total
You can probably even just do:
#SHOW (@variable1 + @variable2)
Basically, simply putting a mathematical expression within parentheses causes it to be treated as a mathematical expression. No need for the obsolete #MATH function from Zmud. |
|
|
|
Dakina Novice
Joined: 22 Apr 2011 Posts: 36 Location: Colorado
|
Posted: Fri Oct 14, 2011 6:05 pm Adding Variables |
Thats what I originally figured, but tried
Var1/var2 in a guage and instead got a/b as the output |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Fri Oct 14, 2011 7:20 pm |
Did you put parentheses around it?
|
|
|
|
Dakina Novice
Joined: 22 Apr 2011 Posts: 36 Location: Colorado
|
Posted: Sat Oct 15, 2011 7:44 pm Dividing 2 variables from each other |
Thanks, it was the parentheses I overlooked.
|
|
|
|
|
|