Re: Parameter Passing - Error in doc ? [message #6230] |
Wed, 15 May 1996 00:00 |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
Marc Herbert (herbert@supaero.fr) wrote:
: I use PV-Wave 5.0 (and 6.0 now), and I have
: to handle with some big images.
: I use almost the entire memory on my system (HP-UX).
: So, I was interested in the question of
: parmeter passing. I've read the documentation
: (Book PG, Chapter 9, para "Procedure or Function
: Calling Mechanism") and noticed with
: big surprise that procedures
: work on a copy of variables,
: EVEN in the case of reference passing !
: This copy being obviously useless,
: if one excepts the case of error
: occurring, and procedure aborting.
: BUT ! I made some testing,
: (try : proc,array1
: to compare with proc,array1(*,*,*,...)
: and with the help of the function 'info,/memory'
: it appears that this copy doesn't actually
: occur ?!??
: So the question is : Is there a mistake in
: the documentation ?
Yes, the documentation is wrong (or at least confusing). Array variables
are passed by reference. This has been noted multiple times on this
group, but the documentation hasn't changed.
Peter
--------------------------------
Peter Webb, HP Labs Medical Dept
E-Mail: peter_webb@hpl.hp.com
Phone: (415) 813-3756
|
|
|