HyperView User's Guide

Constant Value Tables

Constant Value Tables

Previous topic Next topic No expanding text in this topic  

Constant Value Tables

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

When performing operations on value tables using binary operators, it is sometimes necessary to do so with a constant value. Constant value tables are created from the Constant operator in the math library, and have the following properties:

All record lookups will return a value, regardless of the ID.
The number of records in a constant value table is 0.

The following snippet demonstrates the usage of a constant value table:

For every record contained in the table in “A”, a scalar quantity of 4.0 will be returned from the table “econst” with a matching ID.  Supporting constant values in this way allows constant value tables to be interchangeable with “resource” value tables.  Constant value tables are widely used with binary operators, and will fail if passed as both the lhs and rhs parameters due to the fact that there are no records. Constant value tables must always operate with non-constant value tables in binary operations.