comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: [Q] readf into an array error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: [Q] readf into an array error [message #5717 is a reply to message #5714] Mon, 05 February 1996 00:00 Go to previous messageGo to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Ken Knighton (knighton@gav.gat.com) wrote:
: peter@hpl.hp.com (Peter Webb) wrote:
: >This is due to the argument passing mechanism used in IDL. If an array
: >is passed to a function, it is passed by reference. If a subarray is
: >passed, it is passed by value, and thus cannot be overwritten.

: By the way, I found the documentation for this on page 10-7 of the
: user's guide. This documents everything except that structure
: members are passed by value. This tidbit is documented on page
: 7-5 of the user's guide.

As Ken mentions, this behavior is documented. However, the whole
section on argument passing is very badly written. From the PV-Wave
manual, which I believe is a direct copy of the IDL manual,

"When a procedure...is called, the actual parameters are copiend ito the
formal parameters... On exit,...formal are copied back to actual if they
are not expressions or constants."

This is, at best, a feeble attempt to describe pass by reference. The
parameters are not copied, they are referenced (try passing an array so
large that copying would use up all memory -- you can do it, ergo no
copying happened).

Time for a rewrite, RSI!

Peter

--------------------------------
Peter Webb, HP Labs Medical Dept
E-Mail: peter_webb@hpl.hp.com
Phone: (415) 813-3756
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Q:Unable to allocate memory?
Next Topic: Output Types

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Dec 03 01:09:41 PST 2025

Total time taken to generate the page: 1.99562 seconds