Table 25 shows how CL variables are passed from a compiled CL program
to an ILE C++ program. All arguments are passed by reference from CL to
C++.
Table 25. CL Variables Passed from a Compiled CL Program to an ILE C++ Program
CL Variables | C++ Arguments |
---|---|
DCL VAR(&v) TYPE(*CHAR) LEN(10) VALUE('123.4') | "123.4" |
DCL VAR(&d) TYPE(*DEC) LEN(10 1) VALUE(123.4) | __D("0000000123.40000") |
DCL VAR(&h) TYPE(*CHAR) LEN(10) VALUE('Hi') | "Hi" |
DCL VAR(&i) TYPE(*CHAR) LEN(10) VALUE(Lo) | "LO" |
DCL VAR(&j) TYPE(*LGL) LEN(1) VALUE('1') | "1" |
CL variables and numeric literals are not passed to an ILE C++ program with null-terminated strings. Character literals and logical literals are passed as null-terminated strings but are not padded with blanks. Numeric literals such as packed decimals are passed as 15,5 (8 bytes).
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.