Conversion Operations (ESDL Editor)
Several operations allow to convert scalar elements of numerical or enumeration type to limitInt or wrapInt types:
<element>.wrapAround<ImplType>()
The element <element> is converted to a wrap-around integer type with an implementation type and an interval selected by the code generator.
<element>.wrapAround<ImplType>(<min>,<max>)
The element <element> is converted to a wrap-around integer type with an interval specified by the user. The lower and upper bounds of the interval, <min> and <max>, must be generation-time constant integer expressions that are representable in the specified .
<element>.limit()
The element <element> is converted to a limited integer type with an interval selected by the code generator.
<element>.limit(<min>,<max>)
The element <element> is converted to a limited integer type with an interval specified by the user. The lower and upper bounds of the interval, <min> and <max>, must be generation-time constant integer expressions that are representable in a common integer type.
See Examples: Conversion Operations for examples for all four operations.
See also
Scalar Types – Limited Integer
