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

Home » Public Forums » archive » Re: Attempt to subscript FILNAM with I is out of range....
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: Attempt to subscript FILNAM with I is out of range.... [message #31735 is a reply to message #31728] Thu, 15 August 2002 14:14 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Kolbjorn Bekkelund <kobe@rocketrange.no> writes:
> I'm following up my own last post since I found that one cannot use FOR
> statements in batch mode like in normal .run. You have to place all the
> FOR stuff (until the ENDFOR) on one line using $ and &. This because the
> batch mode use of IDL is looking for an END statement on each line after
> the BEGIN. If it doesn't find it you get a syntax error.

As David was saying, probably the *last* thing you want to do is put
all sorts of $ and &'s througout your file. It makes it pretty
incomprehensible.

First of all, IDL code which is run from the command line like you are
doing, "idl myfile.pro", is read directly into the command line
interpretter. Procedure definitions are not allowed, and multi-line
code blocks are not allowed, as you have found out.

The first easiest solution is to make a separate file called
run_myfile.pro, which contains the lonely statement:

.run myfile.pro
exit

and then use "idl run_myfile.pro". Since run_myfile.pro is fed to the
IDL command interpreter, the .RUN directive will work. Why you don't
want to call it as a procedure, well that's up to you.

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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Hough transform help
Next Topic: keayboard events in draw widgets

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

Current Time: Thu Oct 09 20:02:59 PDT 2025

Total time taken to generate the page: 0.63674 seconds