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

Home » Public Forums » archive » Re: while loop crashes
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: while loop crashes [message #71153 is a reply to message #71151] Tue, 01 June 2010 00:51 Go to previous messageGo to previous message
hovru is currently offline  hovru
Messages: 3
Registered: June 2010
Junior Member
On Jun 1, 12:38 am, Spon <christoph.b...@gmail.com> wrote:
> On Jun 1, 7:53 am, hovru <h.rube...@gmail.com> wrote:
>
>> I have been tried several times to run the following script in (by
>> calling it through a .pro file) but it always causes it to crash. It
>> seems simple enough, yet I can't figure out why it won't work.
>
> ---
> pro simpletest
> print, 'start while loop'
>         j=2
> while (j NE 10) do begin
>         print,j
>         j=j+1
>         print, j
> endwhile
>
> print, 'done'
> return
> end
> ---
>
>> simpletest
>
> start while loop
>        2
>        3
>        3
>        4
>        4
>        5
>        5
>        6
>        6
>        7
>        7
>        8
>        8
>        9
>        9
>       10
> done
> ---
>
> Works fine for me.
>
> Regards,
> Chris

Wouldn't you not need the "Pro" and "End" if it's not a program, just
a script (such as when you use "Journal")?
Also, leaving out the "return" should be fine, since there is only one
level, right?

Thanks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to set the multiple xaxis labels
Next Topic: A Contour Tracking Problem

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

Current Time: Wed Oct 08 17:32:24 PDT 2025

Total time taken to generate the page: 0.02944 seconds