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

Home » Public Forums » archive » FOR LOOP problem
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: FOR LOOP problem [message #31031 is a reply to message #30977] Wed, 05 June 2002 12:46 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
skd6@ra.msstate.edu (Shravan Kumar Durvasula) writes:


> Hi,
>
> I am actually working on IONJava. I have a strange problem. This is
> the .pro file that i have written :
>
...
>
> When i compile and run this program from the IDL command prompt, it
> runs absolutely fine. But when i run this file through IONJava using
> the "executeIDLCommand()" (method in the IONGraphicsClient class of
> IONJava) it gives the following error message :
...
>
> I tried eliminating "ENDFOR" by modiying the code to :
>
...
> I then removed END in the last line and tried running it again. It
> worked absolutely fine. I am not able to guess what the problem could
> be. I was wondering if it had anything to do with the indentation as
> it said Syntax error. But i could not correct it. Could anyone please
> help? Any suggestions given on this would be of great help to me.

IDL makes the distinction of what can be run on the command line, and
what can be placed in a compiled procedure. Items that appear on the
command line are more restricted. For example you can't have
multi-line BEGIN/END clauses, which is exactly what you are seeing.

This is also the distinction between the "@" command, and the ".RUN"
command. The former accepts only simple commands, while the latter
expects a fully formed procedure, finished with END, but is able to
take BEGIN/END clauses. The EXECUTE() statement, upon which
executeIDLCommand() must be based, also falls in the former category,
so that's why you are getting errors. Why don't you just stuff all
this into its own procedure?


Good luck,
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: VIP, Julday
Next Topic: speed up the display on Linux

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

Current Time: Sat Oct 11 06:53:46 PDT 2025

Total time taken to generate the page: 9.03550 seconds