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

Home » Public Forums » archive » How to assign command line arguments to variables in another class
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
How to assign command line arguments to variables in another class [message #89260] Sun, 10 August 2014 15:56
tryanblogs is currently offline  tryanblogs
Messages: 3
Registered: August 2014
Junior Member
IDL beginner here! Let's say I have two procedures, PRO1 and PRO2. If I receive a command line argument in PRO2, how can I assign the argument value to a variable in PRO1?

Is this possible to accomplish without passing a parameter in a procedure call? Example:

PRO PRO2
value = command_line_argument
PRO1, value
END

PRO PRO1, value
A = value
END

I have previously tried to make an object reference ,'My', to PRO1, but I receive a syntax error.

PRO PRO2
opts = ob_new('mg_options)
opts.addOption, 'value', 'v'
opts.parseArgs,error_message = errorMsg

My = obj_new('PRO1')
My.A=opts.get('value') ;syntax error on this line
END

Any insight is very much appreciated!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Scary bug with array assignment
Next Topic: Micro-manager JSON Import

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

Current Time: Wed Oct 08 15:34:34 PDT 2025

Total time taken to generate the page: 0.00469 seconds