On Tue, 24 Mar 2020 21:02:57 +0800, David Crayford wrote: >On 2020-03-21 11:45 PM, Paul Gilmartin wrote: >> o Symbols EXPOSEd from external scopes can't be used as targets >> of ITERATE and LEAVE. (I eschew GOTO; SIGNAL is worse,) >If you eschew goto how do you deal with error handling and cleanup using >a language which >doesn't support exceptions, finalization or RAII? I find these kind of >blanket rules to lead to bad code >with deep nesting and useless status variables. > Yah, I know. But, war story: A co-worker approached me for help. He had a Rexx program in which he handled error conditions in nested CALLs, avoiding status variables, by SIGNAL Top_of_main_loop. He had tested it with a small data set, perhaps even with error injection. But in production on a large data set, CALL/RETURN stack overflowed.
My envisioned longITERATE and longLEAVE woild properly clean up the stack while leaving the enclosing DO intact, having no enticement to cavatappi coding. And there should be an option to repair error condition and proceed. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
