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 #93346 is a reply to message #76710] Mon, 20 June 2016 11:46 Go to previous message
jaromrnelson is currently offline  jaromrnelson
Messages: 2
Registered: June 2016
Junior Member
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.

Jarom

On Wednesday, June 29, 2011 at 7:38:43 AM UTC-7, Maegereg wrote:
> On 6/27/11 3:18PM, Michael Galloy wrote:
>> 1. Always check the first error in the file, a single syntax error can
>> cause many later error messages.
>>
>> 2. "Procedure header must appear first and only once" almost always
>> means you forgot to END something -- you have a BEGIN but no END for an
>> IF statement, a FOR loop, etc.
>
> I've checked the first error in each of the two files- both are syntax errors, and in both cases nothing actually appears wrong. Here's the two errors (error is on third line):
>
> END
> 'Funct_AIF_Fast': BEGIN
> SetTimeCommonBlock,tMargin=ObtainTMargin()+tMargin, tRange=tRange
> END
> 'Funct_Artery_AIF': BEGIN
>
> and
> t_time=*(*pState).pt_time
> time_courseC=(*(*pState).timecourse)[(*pState).cursorPositio n[0],(*pState).cursorPosition[1],*]
> uptake_curve=get_uptake_curve(time_courseC, pState, base_level=base_level)
> noise_Level=Calculate_Noise(time_courseC, (*pState).n_base, (*pState).baseStart, (*pState).n_Images-1) ;, df=df)
> ;save, uptake_curve, t_time, filename='D:\tmp.idl'
>
> Eclipse points out the )+ (of the tMargin=ObtainTMargin()+tMargin part), and the =b (of the base_level=base_level part). Neither of them seems to be a syntax error, though do correct me if I'm wrong. There are a ton more of these correct syntax errors scattered throughout the rest of the project.
>
> I also checked the end statements for both of the files. I made a couple changes where it seemed like the wrong end had been used, but even now that the ends are completely correct, the errors persist. Another thing I did notice: eclipse is giving me errors of the form: "Type of end does not match statement" in the functions immediately before I start getting the procedure header errors. I've double checked these functions though, and the ends are correct. And I've also tried just blindly doing what the compiler says to make those bug reports go away (changing the ends to whatever it suggests, even if it's incorrect), but that didn't fix anything either.
[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: Wed Oct 08 18:11:55 PDT 2025

Total time taken to generate the page: 0.00484 seconds