Mixed INTEGER and INT64 expressions
- Last Updated: November 8, 2013
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Mixed INTEGER and INT64 expressions
If arithmetic or comparison expressions contain a mix
of INTEGER and INT64 data types,
the result is an INT64. Dividing an INT64 with
another INT64 produces a DECIMAL result,
as does dividing two INTEGERs.
INT64 support applies to all of the ABL built-in methods
and functions that take integer-expression parameters. That is, integer-expression
parameters can be either INT64 expressions or INTEGER expressions.
Note that you cannot pass an INT64 expression
into a class-based method that is expecting an INTEGER.
Instead, you can use the INTEGER function to convert
the expression to INTEGER, which the method is
expecting. In particular, you must convert the sequence functions
(NEXT-VALUE, CURRENT-VALUE, DYNAMIC-CURRENT-VALUE, DYNAMIC-NEXT-VALUE)
to INTEGER if you want to pass them to a class
method expecting INTEGER.
The following code example demonstrates arithmetic operations
using a mix of INTEGER and INT64 expressions:
|