idl syntax error [message #87944] |
Wed, 05 March 2014 01:37  |
Antoine Denazelle
Messages: 3 Registered: March 2014
|
Junior Member |
|
|
Hi,
I'll make it short because I guess it will not be published...
I see a strange behaviour of IDL compiler concerning keywords.
First compilation points out a syntax error for this kind of line:
my_var= my_func( a, min=b, max=c) (error shows at "=b")
second compilation on a unix system points out no error.
My program works fine, I just wonder why this behaviour. I suspect that for it to appear with no error, some other compilations are needed...
Put min and max in high case doesn't change anything. min and max are maybe not the best name choices, but to change their name doesn't change the problem. (I call them like my predecessor did... )
Thank you in advance for publishing, and answering.
Thank you anyway, this newsgroup is a precious mine of informations!
Cheers,
Antoine
|
|
|
Re: idl syntax error [message #87945 is a reply to message #87944] |
Wed, 05 March 2014 02:35   |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
Le mercredi 5 mars 2014 10:37:17 UTC+1, Antoine Denazelle a écrit :
> Hi,
>
> I'll make it short because I guess it will not be published...
>
> I see a strange behaviour of IDL compiler concerning keywords.
>
> First compilation points out a syntax error for this kind of line:
>
>
>
> my_var= my_func( a, min=b, max=c) (error shows at "=b")
>
>
>
> second compilation on a unix system points out no error.
>
> My program works fine, I just wonder why this behaviour. I suspect that for it to appear with no error, some other compilations are needed...
>
> Put min and max in high case doesn't change anything. min and max are maybe not the best name choices, but to change their name doesn't change the problem. (I call them like my predecessor did... )
>
>
>
> Thank you in advance for publishing, and answering.
>
> Thank you anyway, this newsgroup is a precious mine of informations!
>
>
>
> Cheers,
>
> Antoine
You should not use IDL function names as keyword name. Please use for instance:
my_var = my_func( a, amin=b, amax=c)
alx.
|
|
|
Re: idl syntax error [message #87951 is a reply to message #87945] |
Wed, 05 March 2014 06:27   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, March 5, 2014 3:35:01 AM UTC-7, alx wrote:
> Le mercredi 5 mars 2014 10:37:17 UTC+1, Antoine Denazelle a écrit :
>
>> Hi,
>
>>
>
>> I'll make it short because I guess it will not be published...
>
>>
>
>> I see a strange behaviour of IDL compiler concerning keywords.
>
>>
>
>> First compilation points out a syntax error for this kind of line:
>
>>
>
>>
>
>>
>
>> my_var= my_func( a, min=b, max=c) (error shows at "=b")
>
>>
>
>>
>
>>
>
>> second compilation on a unix system points out no error.
>
>>
>
>> My program works fine, I just wonder why this behaviour. I suspect that for it to appear with no error, some other compilations are needed...
>
>>
>
>> Put min and max in high case doesn't change anything. min and max are maybe not the best name choices, but to change their name doesn't change the problem. (I call them like my predecessor did... )
>
>>
>
>>
>
>>
>
>> Thank you in advance for publishing, and answering.
>
>>
>
>> Thank you anyway, this newsgroup is a precious mine of informations!
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>> Antoine
>
>
>
>
>
> You should not use IDL function names as keyword name. Please use for instance:
>
> my_var = my_func( a, amin=b, amax=c)
>
>
>
> alx.
I suspect it is because my_func is not on IDL's path, so it doesn't know whether it is a function or an array with old-school parentheses. Try using "compile_opt idl2" just before your statement.
-C
|
|
|
|
Re: idl syntax error [message #87958 is a reply to message #87945] |
Thu, 06 March 2014 01:29  |
Antoine Denazelle
Messages: 3 Registered: March 2014
|
Junior Member |
|
|
> You should not use IDL function names as keyword name. Please use for instance:
>
> my_var = my_func( a, amin=b, amax=c)
>
>
>
> alx.
I agree, it's not a very good idea to use such keyword names.
But in this case, this doesn't change the problem.
Thank you!
|
|
|