Can IDL evaluate strings as code?

Posted by Carthage on Stack Overflow See other posts from Stack Overflow or by Carthage
Published on 2010-05-26T15:14:39Z Indexed on 2010/05/26 18:31 UTC
Read the original article Hit count: 179

Filed under:
|
|
|
|

Is there any functionality in IDL that will allow it to evaluate a a string as code?

Or, failing that, is there a nice, dynamic way of including /KEYWORD in functions? For example, if I wanted to ask them for what type of map projection the user wants, is there a way to do it nicely, without large if/case statements for the /Projection_Type keyword it needs?

With even a small number of user options, the combinations would cause if/case statements to get out of hand very quickly to handle all the possible options.

© Stack Overflow or respective owner

Related posts about string

Related posts about function