I'm sorry, I don't follow your analogy. What does CEETSTA do
differently from %ADDR() that makes it more like a dog and less like a
window?
Here's the description of omitted arguments from the ILE Concepts manual:
---
Omitted Arguments
All ILE languages can simulate omitted arguments, which allows the use
of the feedback code mechanism for ILE condition handlers and other
run-time procedures. For example, if an ILE C procedure or an ILE
bindable API is expecting an argument passed by reference, you can
sometimes omit the argument by passing a null pointer in its place. For
information about how to specify an omitted argument in a specific ILE
language, refer to the programmer’s guide for that language. The API
section of the Programming category of the iSeries Information Center
specifies which arguments can be omitted for each API.
For ILE languages that do not provide an intrinsic way for a called
procedure to test if an argument has been omitted, the Test for Omitted
Argument (CEETSTA) bindable API is available.
---
It seems to me that the first paragraph DIRECTLY STATES that an omitted
argument is a reference parameter where the reference is NULL. and that
languages that have a way of referring directly to that pointer can
check for this NULL. It uses ILE C as an example, but of course, we
(being RPG programmers) know that RPG has the same capability.
It then says that for languages that don't have this ability, there's
CEETSTA -- which implies to me that it does the same thing.
Maybe someone like Barbara or Bruce who knows the internals could shed
some light?
Blair Smith wrote:
The gist that I derived from it was:
- Using %ADDR(PARM) is like peering out your windows to see who is
coming up the walk. You can get faked out.
- CEETSTA is the dog circling the neighborhood. It knows where
everyone is and what's in their pockets.
Understandably, until I can find the documentation that I was
reading, this is reduced to an opinion. The technique did help us
and, hopefully, it can help someone else.
G'night.
As an Amazon Associate we earn from qualifying purchases.