Global variables and command line [message #11576] |
Fri, 17 April 1998 00:00 |
Daniel SAGE
Messages: 10 Registered: April 1998
|
Junior Member |
|
|
Hello,
I would like use the variables created in the input command line inside
the procedures/functions. But in my application where I automatically
generate IDL code, I can't use the common mechanism or passing by
parameters.
pro run
resolve_routine, "test"
call_procedure, "test"
end
pro test
common var
print, v1
print, v2
end
IDL> common var, v1
IDL> v1=111
IDL> v2=222
% Compiled module: RUN.
% Compiled module: TEST.
IDL> run
% Procedure was compiled while active: RUN. Returning.
% Compiled module: TEST.
111
% PRINT: Variable is undefined: V2.
% Execution halted at: TEST 10 HD:Desktop Folder:test.pro
% $MAIN$
How is it possible to make V2 visible inside the test procedure when I
can't pass the parameters with the run procedure ?
Thanks
========================================
Daniel Sage
Biomedical Imaging Group
EPFL/DMT/IAO 1015 Lausanne,Switzerland
Tel:+41 21 693 5172 Fax:+41 21 693 3701
Email: daniel.sage@epfl.ch
========================================
|
|
|