"Bryan C. Warnock" wrote:
>
>
> Is it POST, LAST or LAST, POST, at runtime?
Since POST is checking invariants, and LAST can have side effects, LAST
must be executed before POST.
Apo 4 said POSTs were executed in the reverse of the order seen, I
presume that would hold for LAST as well.
> How does one enforce the no side-effects rule, and how deeply does it
> traverse?
Good question!
> Do I remember right that 'return' creates a control exception?
Yes.
> Do KEEP and UNDO take the place of CATCH within a block? (ie, you may either
> CATCH, or you may KEEP and UNDO, but not both?) If all three are allowed,
> what is the exception handling order?
The way I hear it, KEEP/UNDO get executed if there are control/other
exceptions raised, but they do not themselves catch exceptions. The
ordering will be interesting to learn... I'd think/hope KEEP or UNDO
would be executed before CATCH.
> Which blocks may you have more than one of within the same block, and in
> what order will they execute?
It would be nice to have the chart... Here's my interpretation,
corrections welcomed from those in the know. I see no reason not to
permit multiple instances of any of the types of blocks, although they
could be restricted as unnecessary (especially those marked "yes?". It
seems there might not be much reason to allow multiples of those, but
unless there is an implementation reason not to, why not?)
block side multiple order
type effects instances
PRE no yes?/order seen before regular code in block
inherited before
locally defined
regular code yes n/a after PRE, until exception
KEEP yes yes/reverse order if control exception, ofter
reg
UNDO yes yes/reverse order if non-control exception,
after reg
CATCH yes yes?/order seen after KEEP/UNDO
until exception
is cleaned
LAST yes yes/reverse order after regular code if no
exception
after CATCH if exception
POST no yes?/reverse order after LAST
locally defined
before inherited
> In one cannot (or does not) inherit a PRE, POST, or LAST block, is there a
> way to add one without recreating the entire block.
Seems like you could always have your own blocks of any kind... just
define them. In addition, you might inherit one from somewhere else.
--
Glenn
=====
Due to the current economic situation, the light at the
end of the tunnel will be turned off until further notice.