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

Home » Public Forums » archive » Parameter passing in PV-Wave
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Parameter passing in PV-Wave [message #7398] Mon, 04 November 1996 00:00
Bob Fletcher is currently offline  Bob Fletcher
Messages: 1
Registered: November 1996
Junior Member
I'm trying to understand the parameter passing in Wave.
In the programers manual it says

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_'

So what realy happens.
In fortran call by reference I can say

REAL a(10000000000)
call addit(a)
....
subroutine addit(b) PRO, addit,b
b(99999999) = b(99999999)+1 b(99999999) = b(99999999)+1
return RETURN
end end

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 )

Do I end up storing A twice? Does it depend on the variable type of
a? ( List? assoc array? structure?)


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?)


Any ideas?
Bob.

_________________________________________________
Bob Fletcher,
GEAE Analysis Systems
1 Neumann Way, M/D 207
Cincinnati OH 45215-6301
Bob.Fletcher@ae.ge.com
[Message index]
 
Read Message
Previous Topic: The Behavior of CONVOL
Next Topic: Definition of Median was(Re: Finding the index of the median)

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

Current Time: Fri Oct 10 07:06:19 PDT 2025

Total time taken to generate the page: 0.56138 seconds