Skip to content

QS1 var cmd

maybites edited this page Sep 12, 2022 · 1 revision

<var> has ALWAYS to be the first node inside a <script> or <que> node

Simple Example

assign an array to a variable:

<var name="variablename">{ARRAY(0,0,0)}</var>

reference a expression to a variable:

<var name="variablename">{-> ARRAY(COS(alpha),sin(alpha),2)}</var>

Attributes

  • name = name of a variable inside the scope of the node

Explained

<var> instantiates a variable and either

  • evaluates the {expr} and sets the result as its value
  • sets the reference to the {expr} as its value

setting a reference to a variable will execute the expression each time the variable is used further along the code and returns the result of its evaluation. In a sense it is a definition of a function call that can be referenced by the variable.

Clone this wiki locally