IBM Version 4 Universal Remote User Manual


 
ters (A through Z, 0 through 9, $, #, @, ), or _). The system uses an object name
as is, and it does not change or check the object name before locating the object.
This improves the performance of the API. An incorrect name usually results in an
Object not found error.
Parameter Passing
With the exception of the UNIX-type APIs, the standard protocol is to pass a space
pointer that points to the information that is being passed. (This is also referred to
as pass-by-reference.) This is the convention automatically used by CL, RPG, and
COBOL compilers. If you are using a language that supports pointers, you must
ensure that these conventions are followed. Refer to the appropriate language doc-
umentation for instructions. Refer to “Selecting the High-Level Language To Use”
on page 2-3 for a table that discusses the high-level languages.
In an OPM or ILE call, a parameter is an expression that represents a value that
the calling application passes to the API specified in the call. HLL languages use
the following methods for passing parameters:
by value, directly The value of the data object is placed directly into the
parameter list.
by value, indirectly The value of the data object is copied to a temporary
location. The address of the copy (a pointer) is placed
into the parameter list. By value, indirectly is not done
explicitly by the application programmer. It is done by
the operating system at run time.
by reference A pointer to the data object is placed into the parameter
list. Changes made by the called API to the parameter
are reflected in the calling application.
Figure 2-4 illustrates these parameter passing styles. Not all HLL languages
support all styles.
a copy of argument
pointer
pointer
a copy of argument
the actual argument
By value, directly
By value, indirectly
By reference
RV2W1027-1
Figure 2-4. Methods for Passing Parameters
HLL semantics usually determine when data is passed by value and when it is
passed by reference. For example, ILE C passes and accepts parameters by
value, directly, while for OPM and ILE COBOL and OPM and ILE RPG parameters
are usually passed by reference. You must ensure that the calling program or pro-
Chapter 2. Getting Started with APIs 2-7