asint — Provides a type hint to the containing element that it is expecting an integer value.



The ASINT function has the following arguments:


The child expression that is expected to return an integer data type value.


This function provides a type hint to the child expression that an integer data type value is expected. If the expression does not provide an integer valued result then an error will be raised.

This function is required in situations where the data type of the enclosed expression can not determined by the parser at compile time. This is typically due to an expression that is evaluated at runtime to determine a column from a data table, such as with the column, eval, tablelist, tablemap or tablerange functions. The type hint provided by the ASINT function is then used for the semantic analysis required to complete the expression compilation.

No conversion of the data value returned by the child expression is attempted, and if the child data type does not match the hint an error will be generated. For type hinting with data conversion see the int function.


See the example Table range lookup with a non-literal value in the tablerange function for details about how type hints are used.