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

Home » Public Forums » archive » Re: Parameter passing in PV-Wave
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Parameter passing in PV-Wave [message #7386] Wed, 06 November 1996 00:00
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Bob Fletcher (Bob.Fletcher@ae.ge.com) wrote:
: I'm trying to understand the parameter passing in Wave.
: In the programers manual it says

Now there's your first mistake, reading the manual :)

: 1: 'Variables are passed by reference.' (P. 241)

: On page 242 it says: (bullet 5)
: 2: 'values of parmeters passed by reference are _copied back
: into corresponding variables_'

: and I only have to store the big array once. The pass by reference
: just passes the address of a, and the subroutine just finds the right
: memory location and does it's thing. (which allows all those ugly
: fortran cheats passing parts of multidim. arrays.)

: If I do this in Wave what happens? Quote 1: makes me think
: that it's like fortran, but quote 2: makes me think that I have to
: copy the whole array into a separate memory location. ( Bad thing )

The right thing happens, nothing is copied (test by checking the memory
allocated to the process, allocate something big, then pass it to a
function). This section of the manual is horribly written, but hasn't
changed in several years.

: The more general question is, what are the preformance penalties of
: calling functions and procedures. (And does the compiler do anything
: smart. Inlining for instance?)

Good question! Any of our regular performance testers want to take this
one?

Peter
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: [Q] removing undefined variables automatically/rename
Next Topic: Re: BOX_CURSOR

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

Current Time: Wed Oct 08 17:38:34 PDT 2025

Total time taken to generate the page: 0.00359 seconds