On several occasions, IDL has given me a "syntax error" when I've tried to run a compiled, user-written function with keywords set. (It does not happen with every user-written function, and no keywords = no problem with the functions that _do_ cause problems.)
It always speicifies the location of the syntax error as the locaton of the "=" in my first "keyword_n = keyword_n" keyword assignment.
So, while running
IDL> result = my_function(arg_1, arg_2, keyword_1=keyword_1)
gives me an error, running
IDL> result = call_function('my_function', arg_1, arg_2, keyword_1=keyword_1)
works just fine.
But it's just silly that I've gotta go through this extra step on the seemingly random occasions when I encounter this difficulty.
I first thought this might be a case of "mistaken identity," with IDL confusing my function with another variable or program. But I've checked that I don't have duplicate file names and variable names, so it's not clear what "mistaken identification" might be at work.
Got any insight, please, that might explain where/how this problem originates?
- Brian
|