Well, from a technical point of view,

languages like PL/1 (and Fortran, for example), which in their
classical form only supported call by reference, put only addresses in the
reg 1 addressed so-called parameter (address) list. (reg 1 points at the start
of a list of parameter addresses, so that the called routine can access the
arguments specified by the caller on the call statement and maybe change them).

Some additional remarks regarding PL/1: PL/1 often does not point to the
arguments directly from the address in the reg 1 address list, but instead to
descriptor structures, which hold type information about the parameter and
a secondary pointer to the argument, so things are real complicated with PL/1.
And: modern PL/1 supports BYVALUE, too; not only BYREFERENCE.
And NODESCRIPTOR, BTW.

With call by value (which is the only possible parameter mechanism in C),
not addresses but values are put into the reg 1 parameter list,
which is not an address list any more, but a list of values (which can be pointers, of course). But the values can also be double floats, decimals and even structures,
which all can be greater than 4 bytes. So the old rule that the length of
the parameter list determines the number of parameters (parameter count
multiplied by 4) holds no longer.

The problem that by value parameters are larger than 4 bytes (larger than
addresses) is not new with decimal values; it is already a problem with double
float value parameters (it was present from the beginning of C by value
parameter passing).

HTH,
kind regards

Bernd



Am 26.04.2017 um 19:46 schrieb Charles Mills:
I know all that. @DavidNoon said I had to pass the decimal data by value. I
was wondering aloud how the compiler would do that. Never mind in some hack
-- how it does it normally.

Charles




----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to