Changes in 4.0 that could impact 3.x models

Syntactic Differences

For uses Index Values

(beginning 4.0.0.35)

When X is a self-indexed variable,

For j := X do expr

assigns j successively to be element of IndexValue(X). Formerly, in the 1-D self-indexed case, For would assign j from the actual value of X (Mid or Sample). Note: If you really do want to iterate over the value of a self-indexed variable, rather than over its index, use:

For j[] := X do expr

Table syntax

(For builds 4.0.0.31 thru 4.0.0.34)

The Syntax for a Table (or ProbTable, DetermTable) is, and has always been:

Table(I,J)( expr1, expr2, expr3, ... )

with commas between each cell expression. However, Analytica 3.1 would accept expressions separated by spaces only, i.e.:

Table(I,J)( expr1 expr2 expr3 ... )

Analytica 4.0 no longer accepts tables definitions where the commas are missing.

Previous models that have created sensitivity nodes using the "Make Importance" feature may encounter this problem. The list of inputs index created by Analytica 3.1 and earlier did not have commas. The fix: edit the index definition using expression mode and insert commas between the table elements.

This incompatibility has been resolved in build 4.0.0.35 beta. Tables without commas are converted to tables with commas when the model is loaded. Requiring commas allows for the use of blank (not-yet-defined) cells.

Evaluation Differences

Multiplication of NaN or INF by zero

See Ana:IEEE 754 Binary Floating Point Arithmetic. In 3.1, (0*INF) or (0*NaN) returned 0. Now it returns NaN and issues a warning (if Show Result Warnings is on).

Deprecation of Undefined for Null

Formerly, two special values, Undefined and Null served different purposes within Analytica. To simplify things so that modelers don't have to understand the difference, Analytica is moving towards exposing only Null, deprecating the use of Undefined. Several functions that used to return Undefined under certain circumstances now return Null. These include: Attrib of Obj and MdTable.

Setting an attribute to Null now removes the value (formerly it set it to the special value Null, setting to Undefined removed the value).

Although Analytica internally can distinguish between an attribute set to Null and an undefined/uncomputed attribute, this distinction is no longer exposed to Analytica expressions. (Although if you really needed to, you could resort to typescript for this).

These change is highly unlikely to impact existing models, since the method for testing for Undefined formerly has been via the function IsUndef, which returns true for Undefined or Null. Thus, it is only in exceptional circumstances that these changes would have any impact on computations. However, it is possibly you may see <<null>> in your result tables where there was formerly a blank (Undefined displays as a blank).

Comments


You are not allowed to post comments.