INT64 parameter conversions
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
INT64 parameter conversions
Differing integer sizes for DLL parameter data types and ABL data types require automatic conversions between these types. Passing a larger data type to a smaller data type will convert the larger data type to the smaller data type. If the value of the larger data type is greater than what would fit in the smaller data type, ABL generates an overflow error at run time. Passing a smaller data type to a larger data type automatically converts the smaller data type to a larger data type.
For example:
- When passing an
INT64value to aBYTE,SHORT,UNSIGNED-SHORT,LONGorUNSIGNED-LONGDLL parameter, ABL automatically passes the appropriate number of low-order bytes of theINT64value to the DLL function. If theINT64value is larger than what would fit in the target data type, ABL generates an overflow error. - When passing an
INTEGERvalue to anINT64DLL parameter, ABL provides an automatic conversion of the value toINT64. - When returning a
BYTE,SHORT,UNSIGNED-SHORT,LONGorUNSIGNED-LONG INPUT-OUTPUTorOUTPUTDLL parameter to anINT64variable, ABL provides an automatic conversion toINT64. - When returning a
BYTE,SHORT,UNSIGNED-SHORT,LONGorUNSIGNED-LONG RETURNDLL parameter to anINT64variable, ABL provides an automatic conversion toINT64. - When returning an
INT64DLL parameter to anINTEGERvariable, ABL passes only the low-order 4 bytes to theINTEGER, ignoring the high-order bytes. If the returned value is larger than what would fit in anINTEGER, ABL client generates an overflow error. - When returning an
UNSIGNED-LONGto anINTEGERvariable, ABL provides an automatic conversion toINTEGER. If theUNSIGNED-LONGvalue is larger than the maximum value of anINTEGER, ABL generates an overflow error.