Re: exit versus quit

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri, 17 Aug 2007 11:38:59 -0600

On Aug 17, 2007, at 9:13 AM, Lunde, Bruce N CIV NAVOCEANO, NP1 wrote:

> Hello,
>
> Is there any difference between executing "exit" versus "quit" ?

Hi Bruce,
Yes actually there is a difference, which we have only discovered
thanks to your
question. In the current version of NCL, the 'exit' procedure
results in an immediate
call to the Unix exit function: it does not do the normal cleanup
that occurs when 'quit'
(actually a keyword that causes the overall script parsing function
to return) is invoked
or when an NCL script just ends without either of these being executed.

In particular, and this probably has a bearing on your original
question about the NCGM
not being closed properly, the function that closes down the graphics
library does not
get called when 'exit' is invoked. Also now that the NetCDF option
'SuppressClose' is
set True by default, NetCDF files that are open for writing do not
get closed explicitly if
'exit' is called. In some cases this can result in attributes not
getting flushed to the file
properly.

We will make it a priority to improve our documentation concerning
this issue. We may
revisit the way 'exit' works: actually we would like to have a way to
indicate an error exit,
giving 'exit' a parameter like the Unix 'exit' function, but we have
an problem of backwards
compatibility. Anyway thanks for bringing this to our attention.
  -dave

>
> Thanks, Bruce
>
> =====
> Bruce Lunde
> Bruce.Lunde_at_navy.mil
> 228-688-5843
> Code NP1
> Naval Oceanographic Office
> Stennis Space Center, MS
> =====
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 17 2007 - 11:38:59 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 20 2007 - 09:30:37 MDT