|
Okay, first I see basically two kinds of calls in the world, calls to
programs and calls to procedures. I get a little fuzzy on the difference
between a bound procedure and a procedure in a service programs; as far as I
can tell, the difference lies more in the resolution of the procedure
address than in the parameter passing.
But now you throw a tiny wrench into this for me. While I rarely use C or
C++, I've run into more COBOL lately and the way I read what you said, you
need a special syntactical construct to allow COBOL to populate the %parms
variable properly is a COBOL program calls an RPG program. And I assume
this would also apply to procedures.
As I read what you've written, in those cases where you either don't or
can't pass operational descriptors, %parms is meaningless; but does it get a
value?
Here's why I ask: if it at least gets set to the maximum number of
values in the parameter list, then I could make an architectural decision
that all calls that don't use OPDESC must simply include all parameters, and
the called procedure would still work. Whereas if %parms is truly undefined
(or always zero, or something like that), then I would either have to always
call variable parameter procedures with OPDESC (in particular taking care on
COBOL calls) or else somehow test in the called procedure whether OPDESC was
used at all (and I don't even know if that's possible, nor what sort of
overhead it entails).
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.