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

Home » Public Forums » archive » Global variables and command line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Global variables and command line [message #11576] Fri, 17 April 1998 00:00
Daniel SAGE is currently offline  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
========================================
[Message index]
 
Read Message
Previous Topic: Region growing
Next Topic: Plotting surfaces

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

Current Time: Sat Oct 11 06:54:15 PDT 2025

Total time taken to generate the page: 0.96549 seconds