Commands, Declaration commands – CUE Design Director Script Language User Manual

Page 12

Advertising
background image

Reference Manual Design Director Script Language

www.cuesystem.com

Page 12 of 94

2.4. Commands

Commands are divided into the following classes:

1. declaration - used for declaration of variables and parameters of the designed macros.

2. executive – change the status of world of objects

3. flow control - conditionally determine what commands will be executed

4. error handling – enable to define what should be done when an error occurs

5. comments - enable to write user comments into a code

2.4.1.

Declaration commands

Declaration commands in macros have to precede other commands.

They are divided into two groups

• declaraction of parameters

• declaration of variables.

Declaration of parameter precedes the declaration of variables. When the parameters are declared the
order matters – the same parameter order applies to macro call. When the variables are declared the
order is not important – it is possible to mix the declaration of the local variables (the value is known only
at the moment when the macro is running) and static variable (the value of the variable remains even
after macro is left – when the macro is running next the value is available)

The parameter declaration command called by a reference and parameter declaration command called
by a value have been designed for the declaration of parameters.

Two commands have also been designed for the declaration of variables – the first one for local
variables, the second one for static ones.

The all declared names (parameters and variables) have to be unique in macro. In addition to this it
cannot be identical to keywords of the language, global object names or global macro names.

Declaration command called by a parameter – Param

Designed syntax:

Param <parameter name> <type name>

; where

<parameter name> - name of the declared parameter

<type name> - name of the declared parameter. Types are uint, string or any name from object

types.

When the variable type string called by a parameter is declared, the length of the declared variable is not
assigned. This way the language enables one macro to use various types of variables, respectively with
variables type string with a differently declared size of storage space.

Advertising