Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stored Variable
#2
In QM, variables must be at first declared. Examples:

Code:
Copy      Help
str test ;;declare string variable test
test="hello" ;;assign string
out test ;;display it

;or
str test2="hello" ;;declare and assign in single line
;...


;or
str test3 test4 ;;declare 2 variables in single line

;or
str test5("hello") test6("again") ;;declare 2 variables and assign in single line

;For integer values, use int instead of str. For floating-point - double.
;By default, variables are local. To declare a global variable, use +, eg str+


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)