Complex Data Types

Vector

A vector is a one dimensional array of values. This is useful in retrieving a row of data (a tax bracket or exemption bracket) from a table such as a withholding tax table.

Example:
vector var TaxBracket = GetWTAXTableTaxBracket( ‘Semi-monthly’, ‘S’, 10000 );

Accessing values in a vector

To access values in a vector, you can concatenate the name of the column to the name of the vector separated by a dot.

Example:
var TaxOnBracket = TaxBracket.WTAX;

Alternatively, you can enclose the name of the column in square brackets before concatenating this to the name of the vector.

Example:
var TaxOnBracket = TaxBracket[ ‘WTAX’ ];