exit versus quit Behaviour in Begin-End Blocks

From: Lunde, Bruce N CIV NAVOCEANO, NP1 <bruce.lunde_at_nyahnyahspammersnyahnyah>
Date: Mon, 20 Aug 2007 15:33:05 -0500

Hello,

After discovering how "quit" cleans up better
than "exit", I thought that "quit" would be a
good replacement for "exit".

However, it seems that if there is a "quit"
within a begin-end block, then none of that
block will be executed.

It would be nice if "quit" (or some other command)
would allow execution of the block up to the
"quit" statement (i.e. until the logic encounters
the "quit" statement) and then clean up "nicely".

Below is a script which shows this behaviour.
With "quit", the print statement in the block is
never executed. Replace "quit" with "exit", and
the statement will be executed.

Thanks, Bruce

print("BEFORE begin")

begin
  print("INSIDE begin")
  quit
end

print("AFTER begin")

=====
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
Received on Mon Aug 20 2007 - 14:33:05 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 23 2007 - 15:57:17 MDT