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 #76710 is a reply to message #76709] Wed, 29 June 2011 07:38 Go to previous messageGo to previous message
Maegereg is currently offline  Maegereg
Messages: 10
Registered: June 2011
Junior Member
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: Fri Oct 10 01:46:44 PDT 2025

Total time taken to generate the page: 0.88523 seconds