Typed Value Creation

AMPS includes functions for explicitly constructing constant values of various types.

FunctionParametersDescription

FALSE_VALUE

none

Returns a boolean false value.

This function is most useful for constructing values in message types that have a distinct type for boolean values.

In the AMPS expression language, false is equivalent to a literal 0.

TRUE_VALUE

none

Returns a boolean true value.

This function is most useful for constructing values in message types that have a distinct type for boolean values.

In the AMPS expression language, true is typically represented with a literal 1.

NAN_VALUE

none

Returns a NaN (not a number) value.

CHAR_VALUE

integer (0-255)

Returns the character (byte) for the integer provided.

This function is most useful for constructing values in message types that have a distinct type for char values.

In the AMPS expression language, a single character value is equivalent to a string constructed with an escape, and constructing a string literal is more efficient. That is, '\x01' is more efficient in a filter or field construction than CHAR_VALUE(1).

However, to construct a character based on a field, use CHAR_VALUE. For example: CHAR_VALUE(/code).

Last updated

Copyright 2013-2024 60East Technologies, Inc.