This shows you the differences between two versions of the page.
— |
gnucap:manual:commands:eval [2015/12/11 15:39] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== "eval" command ====== | ||
+ | |||
+ | ===== Purpose ===== | ||
+ | |||
+ | Check and evaluate an expression. | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | eval expression | ||
+ | |||
+ | ===== Comments ===== | ||
+ | |||
+ | The eval command evaluates an expression and prints the result as a number. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | gnucap> param a={b+c+7} | ||
+ | gnucap> eval a | ||
+ | parameter b+c+7 has no value | ||
+ | parameter b+c+7 has no value | ||
+ | a= NA | ||
+ | gnucap> param b=c+3 | ||
+ | gnucap> param c=4 | ||
+ | gnucap> eval a | ||
+ | a= 18. | ||
+ | gnucap> eval b+c | ||
+ | (b + c)= 11. | ||
+ | gnucap> | ||