Progress
Language Reference
INTEGER Function
Converts an expression of any data type to an integer value, rounding that value if necessary.
SYNTAX
expression
A constant, field name, variable name, or expression whose value can be of any data type. If the value of expression is character then it must be valid for conversion into a number (for example, “1.67" is valid, “1.x3" is not). If expression is logical, then the result is 0, if expression is FALSE, and 1, if expression is TRUE. If expression is a date, then the result is the number of days from 1/1/4713 B.C. to that day. If the value of expression is the unknown value (?), then the result is unknown.
EXAMPLEThis procedure takes the first word (that is, the substring that precedes the first space character) from the customer address and 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 the cust-num, address, and converted street number are displayed.
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |