Re: how to pass a parameter [message #16798] |
Tue, 17 August 1999 00:00 |
Pavel Romashkin
Messages: 166 Registered: April 1999
|
Senior Member |
|
|
Eva,
I can't quite figure out what you are trying to do; it would help if you
were more descriptive. I guess you can pass and alter variables in
functions as well as have functions return values to variables. Just be
careful about what gets passed by value (element of an array, field of a
structure) - these do not get changed when passed as parameters; if you
pass an entire array, or structure, or a variable as a parameter (these
get passed by reference), they can be altered.
> how can I pass this variable
> in the main program ? My goal is to change this variable in the main
> program ( with a for structure ) and then get ( by calling the
> function ) a new result . how is this possible in idl ?
I guess, it would look like:
for i=0, 10 do a = 2*i
a = my_function(a)
my_procedure, a
> I got a nxn-matrix , that is described with a for-structure with
> "shift" . now I want to change the coefficient of this matrix using
> again a for-structure in order to get several matrices with other
> coeffitients. how can I call this matrix A with 2 indices ?
Sorry, here I got lost. What are the dimensions? What is a nxn-matrix?
How is it "described with SHIFT"? Why use a for-loop? What matrix
coefficients? Am I missing something? Sorry if I am just too ignorant,
just learning too (life-long process for many :-).
Cheers,
Pavel
P.S. Why does it seem hopeless to get any postings from people after
about 1:30 pm?
|
|
|