Type conversion operator
The type conversion operator creates a property that performs type conversion.
Syntax
className(expr)
Description
The operator creates a property whose value is the value of expr converted to the built-in class className. Which conversions are meaningful, and when the result is NULL, is determined by the type conversion abstraction.
Parameters
-
classNameThe target built-in class that the value is converted into. Any built-in class may be specified, including parameterized ones written with their parameters (for example,
STRING[15],BPSTRING[10], orNUMERIC[10,2]). -
exprThe expression whose value is converted.
Examples
itemCount = DATA INTEGER (Store);
itemCountToString(s) = BPSTRING[10](itemCount(s));
barcode = DATA STRING[15] (Item);
longBarcode(Item i) = LONG(barcode(i));