Variable name musn’t contain any anScript operator (.+-*/%=,()[]
). Variable can be global or local and constans (or non constans). Global variable can be accessed from anywhere, and local ony between variableCreateLocal(a, value)
and variableDeleteLocal(a)
instructions.
variableCreate(&var new, var b)
Create variable new
and assign b
to new
.
variableCreateLocal(&var a, var b)
Create local variable a
and assign b
to a
.
variableDeleteLocal(&var a, ...)
Delete local variable a
and ...
, a
and ...
return to their previous value.
variableAssign(&var a, var b)
Assign b
to a
.
variableSwap(&var a, &var b)
Swap a
and b
.
variableToIntegerNumber(&var a, ...)
Change a
and ...
to supertype var.i
.
Possible conversions:
var.f
var.s
variableToFloatNumber(&var a, ...)
Change a
and ...
to supertype var.f
.
Possible conversions:
var.i
var.s
variableToCharArray(&var a, ...)
Change a
and ...
to supertype var.s
.
Possible conversions:
var.i
var.f
var[]
variableToVariableArray(&var a, ...)
Change a
and ...
to supertype var[]
.
Possible conversions:
var.i
var.f
var.s
Example 1:
a (supertype: var.s value: abc)
a (supertype: var[] value: {(supertype: var.s value: a)(supertype: var.s value: b)(supertype: var.s value: c)})
)Example 2:
a (supertype: var.i value: 123)
a (supertype: var[] value: {(supertype: var.i value: 123)})
)variableCharArray_toSpace(&var a.s)
obsolete, use
<s>
preparator command instead
Change all ‘_’ characters in a
to ‘ ‘ (space).
variableMakeConstans(&var a)
Make con
constans.
variableFromText(&var a, text)
Assign text
as var.s
to a
.
variableReadFromCharArray(&var a, var.s key)
obsolete, use
[var.s key]
operator instead
Assign value of variable named as key
’s value to a
.
variableWriteToCharArray(var a, var.s key)
obsolete, use
[var.s key]
operator instead
Assign value of a
to variable named as key
’s value and create sych variable if it doesn’t exist.
variableCreateLocal
variableCreate(a, -7.i)
/Now a has value -7
variableCreateLocal(a, 3.14.f)
/Now a has value 3.14
yourInstruction(a)
/in yourInstruction first argument has value 3.14
variableDeleteLocal(a)
/Now a has value -7 again
variableCreateLocal
continuationvariableCreateLocal(a, hello.s)
/Now a has value hello
variableDeleteLocal(a)
/Now a has value var (it exists, but nothing is assigned)
variableToCharArray
usagevariableCreate(tab, {1.i; hello.s; 3.14.f})
tab.variableToCharArray()
consolePrint(tab)