Aztec® Programming Language

Version 1.0 Alpha

Copyright © 2010-2013

Cold Spring® Development Group

All Rights Reserved

Download Aztec

Site Help

♦ Syntax:           TargetIdentifier = Expression

♦ Where ‘TargetIdentifier’ is a valid identifier (global, local or class) and ‘Expression’ is a valid Aztec expression with a data type which matches the target identifier.

♦ The assignment statement can be used at the module level and class level for compile-time logic, and at the method level for run-time logic.

♦ If used at the module or class level, the target identifier must be marked with the ‘compiler’ keyword and each term in the expression must either be a constant or also marked with ‘compiler’ (data or method call).

♦ For a primitive target identifier used as a “value” (no ‘@’), the expression data type must match the identifier exactly. The only exception is an integer expression being assigned to a floating point target, the system automatically converts the int to a float.

♦ For target identifier used as a “reference”, the data type of the expression must satisfy the standard OO “is a” relationship with the target identifier.

♦ Assignment statements can not be chained ("a=b=c" is not valid syntax).

♦ A corollary to this rule is that the assignment statement itself does not return a value. This means that an assignment using a boolean target can not be mistakenly used where a conditional expression is needed. In other words, the syntax "if ( IsValid = GetBoolValue() )" is invalid. The expression must be boolean, and since the boolean assignment itself does not return a value, it is not valid.

 

Page UpPage DownCopyright © 2010-2013
Cold Spring Development Group
All Rights Reserved

Download Aztec