|
As I understand it, if the variable passed has the same length/type as the
parameter definition, the address of the variable is passed directly; if it
has a different type or length, it's copied into a temporary variable, whose
address is passed to the procedure.
In the second case, I assume that if the called procedure *were* to
change the parameter, since it would only affect the temporary variable, it
wouldn't be a problem, whereas in the first case, it *could* affect the
variable in the calling program. Is this correct?
A low-level question then: In the second case (using a temporary variable),
is the storage for that variable freed immediately after the procedure has
returned control or what?
This mailing list archive is Copyright 1997-2026 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.