X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Nov 2005 02:38 PM by  anon
Calling user-written functions with keywords without using CALL_FUNCTION
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
23 Nov 2005 02:38 PM
    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
    You are not authorized to post a reply.