![]() | Variables |
| Prev | Parser features | Next |
Variables don't need to be declared. Once you use variable, it is considered declared. Type of a variable is recognized automatically and can be changed later.
Assocative arrays are supported as well. They map string keys onto values of any type. To declare such array, you can just add some element to it, for example: A["Quanta"] = "Web editor". Arrays are also handled by foreach command and array functions.
Local and global variables are supported. Global variables are marked by leading underscore. So, myVar is a local variable, but _myVar is global. The same applies to arrays.
a = 5 b = 2 * 5 - (a + 1) c = "[Item " + b + "]" d["MyKey"] = "MyValue" d["MyKey2"] = 5
Using variables for widgets works much as you would expect. This is usful when looping widgets inot a table.
for i=0 to 10 do mycombo = "ComboTable"+i createWidget(mycombo, "ComboBox", "Form1") end
| Prev | Home | Next |
| Expressions | Up | Built in Globals |