Difference between /varcalc and ${Math.Calc[]}?
Posted: Tue May 04, 2004 8:50 pm
This code errors with test[1] not found and then echos 30.
this Code works as expected and echos 25.
Code: Select all
Sub Main
/declare test[30] int outer
/varset test[1] 30
/varcalc test[1] ${test[1]}-5
/echo ${test[1]}
/return
Code: Select all
Sub Main
/declare test[30] int outer
/varset test[1] 30
/varset test[1] ${Math.Calc[${test[1]}-5]}
/echo ${test[1]}
/return