Re: procedure in case statement [message #82146 is a reply to message #82049] |
Mon, 19 November 2012 06:33   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
hannah_ue@web.de writes:
> hm... i get the same error. what i have is: 2 procedures i wrote which work. instead of using two different files for each procedure, i want one file where i can choose the one procedure i like. lets call them proc_one,a,b,c and proc_two,d,e,f. i tried it like the following:
>
> read,rot,prompt='rot via proc one or two? (proc_one,proc_two)'
> case rot of
> 'proc_one': call_procedure,proc_one,a,b,c
> 'proc_two': call_procedure,porch_two,d,e,f
> endcase
>
> maybe this is not very clever but i have no idea how to do it in another way
Well, there are a LOT of things wrong with this approach,
probably, but I would start by putting your two procedures
in two separate files, named correctly:
http://www.idlcoyote.com/code_tips/mostcommon.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|