![]() ![]()
|
INTEGER function
Converts an expression of any data type, with the exception of BLOB, CLOB, and RAW, to a 32-bit integer value of data type INTEGER, rounding that value if necessary.
expression
A constant, field name, variable name, or expression. If the value ofexpressionis a CHARACTER, it must be valid for conversion into a number (for example, “1.67" is valid, “1.x3" is not). Ifexpressionis an object reference (CLASS), the result is the ABL-generated ID for the class instance. Ifexpressionis a LOGICAL, the result is 0 ifexpressionis FALSE and the result is 1 ifexpressionis TRUE. Ifexpressionis a DATE, the result is the number of days from 1/1/4713 B.C. to that day. Ifexpressionis the Unknown value (?), the result is the Unknown value (?).ExampleThis procedure takes the first word (that is, the substring that precedes the first space character) from the Customer
Addressand tries to convert it to an integer (street-number). If the conversion fails (for example, the first word contains non-numeric characters) the procedure displays an error message. Otherwise theCustNum,Address, and converted street number are displayed.
See also
![]() |
OpenEdge Release 10.2B
|
![]() ![]()
|