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

Home » Public Forums » archive » Assigning command line arguments to variables in another procedure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Assigning command line arguments to variables in another procedure [message #89261] Sun, 10 August 2014 15:57 Go to previous message
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!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: cgBoxPlot - not a useful function!!!
Next Topic: updated "Using Python From IDL" ebook

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

Current Time: Sat Oct 11 12:16:36 PDT 2025

Total time taken to generate the page: 0.95672 seconds