comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Compilation Error: Procedure header must appear first and onlyonce
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Compilation Error: Procedure header must appear first and onlyonce [message #76800 is a reply to message #76710] Wed, 29 June 2011 14:39 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/29/11 1:11 PM, Maegereg wrote:
> On 6/29/11 11:30 AM, Michael Galloy wrote:
>
>> These errors are usually indicative that you think you are calling a
>> function, but IDL thinks you are indexing an array. I would use
>> "compile_opt strictarr" at the beginning of each routine *and* only use
>> square brackets to index the array.
>
> It works! All the compile errors disappeared when I added compile_opt strictarr to their functions. Thank you very much for your help. I would not have thought to try that in a thousand years.

Glad that fixed it! Yes, errors of this type of problem can be very
difficult to track down: "syntax error" doesn't give you much to go on.
I use "compile_opt strictarr" always just so that I don't get stumped by
this error every once in a while.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Upgrading to Windows 10
Next Topic: Moment and XROI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 02:46:26 PDT 2025

Total time taken to generate the page: 0.79767 seconds