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

Home » Public Forums » archive » Re: Stupid Question#1
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: Stupid Question#1 [message #13289] Tue, 03 November 1998 00:00 Go to previous message
Harald Frey is currently offline  Harald Frey
Messages: 41
Registered: March 1997
Member
rob cosgrave wrote:

> Hi Folks,
> am having a spot of bother with smething that should be really
> simple. I cannot get FOR ....DO BEGIN ENDFOR loops to work. I thought
> first it was something to do with my program, so I tried a really simple
> one, and that didn't work. Then I cut and paste the example out of the
> online documentation and that didn't work. And then I tried running one
> of the scripts which came with IDL and that didn't work either. They
> all failed at the endfor, and didn't close the loop.
> I thought it was just me doing something stupid, but when
> the programs that came with it failed also...
> My version is the IDL student on a Win95 machine. Could the
> student editionness be the problem?
> Again, apologies for the dumb question, but this is driving me crazy,
> and it's kinda hard to program without loops!
> thanks
> Rob Cosgrave

It's hard to make a diagnostics without the lines that failed. However, I assume
that you tried the FOR-loop in the interactive mode and did not take into
account that this works only on one line and that you have to combine multiple
statements with the "$" and/or "&" characters.

One simple example:

for i=0,10 do begin & print,i & j=i^2 & print,j & endfor

Harald frey
hfrey@ssl.berkeley.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: clipboard objects and postscript (unix)
Next Topic: IDL and LAPACK

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

Current Time: Thu Oct 09 22:48:34 PDT 2025

Total time taken to generate the page: 1.20298 seconds