10-10-2005, 08:48 PM
Use int instead of str, and no quotes.
int test ;;declare integer variable test
test=8 ;;assign integer value
out (test + 1) ;;display test + 1 (=9)
Or, if it must be string, convert it to integer to do calculations:
str test ;;declare string variable test
test="8" ;;assign string
int i=val(test) ;;convert to integer
i=i+1 ;;or just i+1
test=i ;;convert to string
out test
int test ;;declare integer variable test
test=8 ;;assign integer value
out (test + 1) ;;display test + 1 (=9)
Or, if it must be string, convert it to integer to do calculations:
str test ;;declare string variable test
test="8" ;;assign string
int i=val(test) ;;convert to integer
i=i+1 ;;or just i+1
test=i ;;convert to string
out test