Table 23 shows how arguments are passed from a command line CL call
to an ILE C++ program.
Table 23. Arguments Passed from a Command Line CL Call to an ILE C++ Program
Command Line Argument | Argv Array | ILE C++ Arguments |
---|---|---|
| argv[0] | "LIB/PGMNAME" |
| argv[1..255] | normal parameters |
'123.4' | argv[1] | "123.4" |
123.4 | argv[2] | __D("0000000123.40000") |
'Hi' | argv[3] | "Hi" |
Lo | argv[4] | "LO" |
'1' | argv[5] | "1" |
A CL character array is not null-terminated when it is passed to another
program.
A C++ program that receives such an argument from a CL program should not
expect the strings to be null-terminated. You can use the
QCAPEXC API to ensure that all the arguments are
null-terminated.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.