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

Home » Public Forums » archive » Compilation Error: Procedure header must appear first and only once
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 only once [message #94294 is a reply to message #94292] Fri, 31 March 2017 06:22 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 03/30/2017 11:49 PM, Helder wrote:
> On Monday, June 20, 2016 at 8:46:15 PM UTC+2, jaromr...@gmail.com wrote:
>> I know this question is very old, but this was an error I was
>> getting, and I could not find the solution. I eventually found in my
>> case that this error was caused by a non-printed non-ASCII character at
>> the beginning of the file. After copying the text and saving as a new
>> file (fortuitously without the rogue character) the error disappeared.
>> Subsequent comparisons between the two files revealed the error.
>>
>> Posting here since this is high on the results lists in internet searches for this error message.
>>
>> On Monday, June 27, 2011 at 1:38:42 PM UTC-7, Maegereg wrote:
>>> [...] in both of the files, all
>>> the procedures and functions defined past a certain point produce the
>>> following error on compilation:
>>> "% Procedure header must appear first and only once: ANALYZE _ROI_DATA
>>> At:..." (for example). Every function and procedure that's later in a
>>> file than a function or procedure that's got that error gets it too.
>>> And if you were wondering about functions getting an error about
>>> procedures, the functions all also get "Return statement in procedures
>>> can't have values." I've been able to fix it by rearranging the
>>> functions/procedures in a file (worked on one of the two files,
>>> haven't tried it on the other), but I understand there are good
>>> reasons to leave the command procedures/functions at the end of the
>>> file.
>>>
>>> I've checked a number of possibilities: these aren't already defined
>>> in the IDL libraries. I checked the procedures immediately before the
>>> first erroneous procedure in both files, and all the begin statements
>>> (and equivalents) seem to have corresponding end statements. The
>>> program compiles fine in IDL 6.4 (I don't have a copy of 6.4, but I've
>>> seen this program run, and have used it myself). I'm just about at the
>>> end of things I can think of to try to fix this. Anyone have any
>>> suggestions?
>
> I'll also add to this. I had the same problem and there where no missing "end".
> My thoughts:
> - this probably only happens if you use the IDLDE.
> - this happened to me copying and pasting a file from github.
> - between every procedure apparently a hidden character was added. Removing these "empty" lines between procedures solved the issue.
>
> Don't have time test "what" the hidden char is, but it surely happened
> as a result of the copying from github. I also know that there are other
> ways to clone into eclipse/IDLDE, but I didn't want to bother...

That happened a while back to me too, and I think I had a file where all
my lines used to end with \n, but I copy-pasted some lines into it which
ended on \r\n.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Remote plotting
Next Topic: New behavior of n_elements?

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

Current Time: Wed Oct 08 11:00:07 PDT 2025

Total time taken to generate the page: 0.00529 seconds