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

Home » Public Forums » archive » quirk End of file encountered before end of program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
quirk End of file encountered before end of program [message #89856] Thu, 11 December 2014 07:03 Go to previous message
LC's No-Spam Newsread[1] is currently offline  LC's No-Spam Newsread[1]
Messages: 8
Registered: June 2008
Junior Member
I am trying to adapt some old code to a new task. I *occasionally* get
(IDL 8.4 on Linux)

return
^
% Syntax error.
At: xxx.pro, Line 26

% End of file encountered before end of program.
At: xxx.pro, Line 28

although the program contains a perfectly valid return and end statement

Then I strip the program of almost all code, and it compiles. Then I
gradually add code until I get the error. Each time I exit and
reenter IDL.

I had a thought that it could be a sequence of begin end clauses in a
case statement (could it confuse the end of a begin end with the
compiler end ?) but than I remove entirely the case statement and go
back to the code which last time compiled, and it still gives the
error.

The code should look something like this

pro xxx.pro,ARGUMENTS
openw,2,'temporary.temp'
printf,2,'structure=create_struct( $'

CASE STATEMENT FILLING THE STRUCTURE DEFINITION in the temp file
(the default for an "empty" structure would just be)
printf,2," 'data',-1 $"

printf,2,')'
close,2
; and instantiate it
@ temporary.temp
;help,structure
return
end

sometimes the code with the CASE gives the error, sometimes doesn't.
Sometimes the code without the CASE gives the error, I comment out the
batch invocation of @ temporary.temp, and it doesn't ... then I reinsert
the batch invocation and then it works.

I also have the impression sometimes it finds an early version of
temporary.temp or does not find it even if existing. But the file is on
a local disk, not NFS (these glitches can occur if nfs client and server
are out of sync), and moreover we use ntp to keep all our clocks on
synch.

Any clue ? I hate non-reproducible errors ...


--
------------------------------------------------------------ ----------
nospam@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: reading binary file with READ_BINARY
Next Topic: IDLgrPolygon question

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

Current Time: Wed Oct 08 13:31:53 PDT 2025

Total time taken to generate the page: 0.00462 seconds