V statements


V statements add, modify, and delete objects. This section first provides an overview of the general coding rules that apply to V statements and then describes each available statement.

General coding rules

The following general coding rules apply to all V statements.

Clauses

A V statement consists of one or more clauses, such as object type, name, and value expression, terminated by a semicolon.

For example:


int var1<NEportLevels=2>[] => {a,b};

The clauses in this statement are

int Object's type

var1 Object's name

<NEportLevels=2> Objects' property specification

[] Array dimension declaration

=> {a,b} Connection expression

•      

Order of clauses

Clauses must appear in the order indicated by the syntax.

For example, if a statement specifies both properties and an array declaration, the properties clause appears first:


int var1 <NEportLevels=2> [] => {a,b};

Operators

 

Where a statement can start

A statement can start anywhere on a line. It can start on the same line that another statement ends.

Separators

Clauses must be separated from one another by spaces, tabs, or newlines. You can insert any number of these between clauses.

Certain clauses use special characters, which can also act as separators. The reference-mode clause uses the special characters ^, &, and *; the array-declarator clause uses [ and ]; the properties clause uses < and >; and the subobjects clause uses { and }. You do not have to code a space, tab, or newline on either side of them.

Separators are not required before the semicolon that terminates a statement.

For example:


group &var1[3]; // Valid.
group&var1[3]; // Valid.
group & var1      [3]   ; // Valid.


groupvar1[3]; // Invalid.

In the last example, the object's type and name must be separated from one another with a space, tab, newline, or special character as follows:


group var1[3];

Continuation lines

A statement can appear on one line or be split across multiple lines. No special formatting is required for continuation lines.

For example, the following statements are equivalent:


int var1[] => {a, b};


int var1
[]
=> {a,b}
;

Continuing character strings

You can continue a character string literal to another line, but the newline character is considered part of the string.

Case sensitivity

AVS/Express is case sensitive.

For example, assuming you want the object type to be int, the following statement is invalid:


Int var1[3]; // Invalid.