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

Home » Public Forums » archive » Re: Use of STOP inside an IF statement
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: Use of STOP inside an IF statement [message #60880 is a reply to message #60877] Tue, 17 June 2008 11:16 Go to previous messageGo to previous message
Chris[5] is currently offline  Chris[5]
Messages: 16
Registered: May 2008
Junior Member
On Jun 17, 7:46 am, Benjamin.R.Ev...@gmail.com wrote:
> I currently have:
>
> spawn, 'mkdir '+output_dir, message
> IF ( string(message) ) then begin
> print, message
> stop
> ENDIF
>
> But the stop command will not work inside the IF statment but it will
> work
> outside the IF statment. I need it to be inside the IF statement so
> that the program
> stops if a message is printed out.
>
> Any help would be appreciated.
>
> Ben

The code looks fine. Have you considered the fact that the if
statement isn't true? For example, on my linux machine at least, if I
call mkdir through spawn and attempt to create an illegal directory
(one that already exists, for example), I get an error message printed
directly to the terminal, but not returned to the message variable. In
this case, your if loop fails to fire. The error message WOULD be
displayed to the screen but, if this if statement is embedded in some
sort of computationally intensive region of code, there tends to be a
lag between when messages are sent to the the terminal and when they
show up, leading you to think that it's not printing at all.

chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to print from an iTool? In color.
Next Topic: ASCII TEMPLATE (read the 31 column of ascii file only)

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

Current Time: Sat Oct 25 11:20:25 PDT 2025

Total time taken to generate the page: 1.60315 seconds