[Thread Prev][Thread Next][Index]

Re: exit

On Fri, 13 Sep 2002, Boyin Huang wrote:
> I tried to use EXIT to "return (as in FORTRAN)" current sub-script.
> It's OK if I directly put a line of
> but, the ferret quits entirely when I used an IF condition: if `$1 eq
> 2` then EXIT endif

Hi Boyin,

This appears to be a bug in the way Ferret parses single-line IF
statements; I see the same behavior in v5.41beta.  But it'll work fine if
you split up the IF into separate lines:

IF `$1 eq 2` THEN

See also the documentation for the different variants of EXIT:


Andrew Wittenberg          Program in Atmospheric and Oceanic Sciences
andyw@splash.princeton.edu                        Princeton University

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement