Error: Procedure header must appear first and only once [message #76727] |
Tue, 28 June 2011 08:02  |
Maegereg
Messages: 10 Registered: June 2011
|
Junior Member |
|
|
I'm trying to debug some source code written by someone else. This is
my first contact with IDL, though I've worked extensively with C and
Python in the past. The code was written in IDL 6.4, and compiles fine
there (I have an executable file that was created there). I, however,
am working in IDL 8.0, and am getting some strange compilation errors.
In two of the files, all functions/procedures past a certain point
generate the following errors:
"% Procedure header must appear first and only once:
DCE_MRI_ABC_CLEANUP At: ..."
Once a singly function/procedure gets the error, every function/
procedure in the file after it will get the same error. And all the
functions that get this error also get a "Return statement in
procedures can't have values" for all their return statements.
I tried rearranging the functions in one of the files to effect a
solution, and it worked- if all the erroneous functions were put
before the last unbroken function, everything worked fine. From what I
understand, though, there are some good reasons to leave the command
procedure at the end of the file, so that's not a workable fix.
I've looked through the functions immediately proceeding the broken
sections, and the ends appear to be properly matched with begins.
Those particular functions do generate a series of errors about a
different type of end being expected though (END instead of ENDFOR,
etc), but as far as I can tell there's nothing wrong with them. I'm
pretty thoroughly baffled. Any suggestions would be most appreciated.
|
|
|