Re: newbie seeks to debug "% Syntax error." [message #61165] |
Fri, 04 July 2008 19:02  |
Tom Roche
Messages: 11 Registered: July 2008
|
Junior Member |
|
|
Tom Roche Fri, 4 Jul 2008 14:05:42 -0700 (PDT)
>> I'm guessing the etiology here is that IDL fails to find the
>> definition, then gets the syntax error at the '=', which is illegal
>> in an array.
Timm Fri, 4 Jul 2008 15:18:31 -0700 (PDT)
> That's right. It has happened to me that IDL doesn't find the
> routine called, even if its *.pro file *is* actually somewhere in
> the !PATH. In any case, adding
> COMPILE_OPT strictarr
> in the routine code (see the online help for COMPILE_OPT) will at
> least force IDL to interpret parentheses as function calls (and
> require square brackets for array indexing).
Thanks! BTW, I notice
http://127.0.0.1:54669/help/topic/com.rsi.idl.doc.core/COMPI LE_OPT.html
>>> We recommend the use of
>>> COMPILE_OPT IDL2
...
>>> * IDL2 -- A shorthand way of saying:
>>> COMPILE_OPT DEFINT32, STRICTARR
>>> * DEFINT32 -- IDL should assume that lexical integer constants
>>> default to the 32-bit type rather than the usual default of
>>> 16-bit integers. This takes effect from the point where the
>>> COMPILE_OPT statement appears in the routine being compiled and
>>> remains in effect until the end of the routine. The following
>>> table illustrates how the DEFINT32 argument changes the
>>> interpretation of integer constants.
|
|
|