Newbie question on ON WARNING



Generally speaking, in DCL procedures, the ON conditions are not
stacked. When one issues a second ON WARNING in a procedure, it replaces
any previously set ON WARNING condition. And ON condistion are
"consumed" if triggered, you need to re-issue them if necessary.


Does this also apply to subroutines ?

AKA: does an ON WARNING/ERROR command inside a subroutine overwrite one
that was set in the calling code ? When the subroutine exits, does the
previous ON WARNING/ERROR get re-instated ?

Or must the calling code re-establish any/all ON conditions to ensure
the subroutine has not messed with them ?

If the subroutine's ON command overwrites the calling code's, does this
mean that an error/warning happening after the subroutine returns to the
calling code, the calling code would branch to the label inside the
subroutine that had been set while the subroutine executed ?


Similarly, is it correct to state that the ON conditions are stacked
when a command procedure calls andother command procedure with the @
command ?
.



Relevant Pages

  • Re: Update two files with one WRITE command
    ... not rely on triggers, there is no need to re-enable triggers after a ... I'm trying to come up with a full proof method of replicating a system ... Is possible to update two files with one WRITE command? ... I could write a SUBROUTINE to handle all the WRITE commands and have it ...
    (comp.databases.pick)
  • Re: any help?
    ... based on the arguments given to the subroutine. ... > command, but it seemed to reference variables, and I don't want to screw ... renames file a to b ...
    (perl.beginners)
  • Re: if-andif-then statement - need help
    ... Show us the code where you trying to use blnFirst. ... declaring command subroutines or the variables 'Private', ... i also HAD to enter blnFirst=True at the beginning of my command macro, ... userform initialization subroutine; and tested and subsequently set to False ...
    (microsoft.public.word.vba.userforms)
  • Re: When MV is not an option
    ... are converted to GOTO statements. ... > the subroutine is used from within another subroutine, ... > Much better programming is to have an error flag that perculates back up ... A command properly used is fine. ...
    (comp.databases.pick)
  • f77 vs g77 problem
    ... c9004_sub.for:217: warning: ... Iterative DO loop begin, end, and step-count values known to result in ... no iterations at ... c9004_sub.for: In subroutine `tauincfe2': ...
    (comp.lang.fortran)