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
Re: quirk End of file encountered before end of program [message #89867 is a reply to message #89860] Fri, 12 December 2014 05:38 Go to previous messageGo 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
On Thu, 11 Dec 2014, Jim P wrote:

>> 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
>> printf,2,')'
>> close,2
>> ; and instantiate it
>> @ temporary.temp
>> return
>> end

> I suspect this isn't behaving as you wish it to behave, due to a
> misinterpretation of how "@" is used.
>
> The "@" in your code is interpreted at compile time, not at run time.

I did not realize that.

The original code I had (dating to several years ago, before anonymous
structures were introduced) used in fact a much more complex mechanism.

It wrote the structure definition (without use of CREATE_STRUCT which
did not exist) to the temporary.temp file

then wrote a xxxtmpnnn.pro file with nnn increasing each time, which
contained the invocation of @temporary.temp (and passed back the
created structure as argument)

then built a string with the invocation of xxxtmpnnn.pro
and used execute to invoke it

When I did now some simple tests, I thought that the above arrangement
was become unnecessary now with create_struct and anonymous structures.
I wanted to simplify it and hoped it were NOW possible.


Apparently I cannot do execute('@temporary.temp')

Is there any limitation to the string length in execute(string) ?

I used a temporary file because the structure definition is rather long,
and is constructed in steps (driven from a data file) ... for legibility
temporary.temp has the statement on several lines (terminated by the $
continuation marker but last one)

If there is no limitation I could concatenate the pieces of the
statement instead of writing them to temporary.temp and just execute the
resulting string.
[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 17:12:06 PDT 2025

Total time taken to generate the page: 0.00396 seconds