![]() ![]()
|
LOGICAL function
Converts any data type into the LOGICAL data type.
Syntax
expressionchar-expression-formatExampleThe following code fragment illustrates the Logical function:
Notes
- If the value of
expressionis the Unknown value (?), the LOGICAL function returns the Unknown value (?).- If
expressionis of type DECIMAL, INTEGER, INT64, DATE, DATETIME, DATTIME-TZ, or HANDLE, the function returns TRUE if the value ofexpressionis nonzero. If the value ofexpressionis 0, it returns FALSE. The second argument is ignored if present.- If
expressionis of type LONGCHAR or CHARACTER, it returns TRUE or FALSE depending on the value in the expression and the format used. Whether or notchar-expression-formatis given, the case-insensitive values TRUE, FALSE, YES, NO, abbreviated to 1 character, are always accepted. For example, a "Y" is interpreted as TRUE.- If
char-expression-formatis given, it is validated. If it is not valid, an error message appears and the Unknown value (?) is returned. Otherwise, the format is used to interpret the character string if it is not one of the following: TRUE, FALSE, YES, or NO. For example, LOGICAL ("si", "si/no" ) returns TRUE.- Data types such as RAW, MEMPTR, LVARBINARY, and so on return the Unknown value (
?), but this is not considered an error.See also
![]() |
OpenEdge Release 10.2B
|
![]() ![]()
|