John Ehrman wrote:
> There's no reason your SP macro code can't include a jump to an error handler
> when an error occurs.
> Donald Knuth once wrote a scholarly article called "Structured Programming
> with GOTO Statements" where he showed that
> attempts to be "purely structured" were often more obscure than using a GOTO
> when it was simplest.
Yeah, what they said.
I recently changed a couple of multi-thousand-line programs to use SPMs
and my first thought was that I was going to eliminate all of the branches in
them. But as I got going, it became pretty apparent that to do so would require
things that made the code a little bit less readable, like lengthening
IF-blocks and adding a couple of more indentation spacings to blocks that
already had a fair amount of indentation to them.
Then, I told myself that the whole point of the exercise was to make
the code more readable, so a branch to a return-to-caller label every now and
then didn't really defeat the purpose and actually _did_ help things. IMHO,
rather than seeing a big nested IF statement and chasing down the end point
just to figure out that you're gonna return to the caller is a bit more
involved than realizing, "Oh, I'm just getting out of Dodge."
And you've probably come across it in the SHARE presentations that
you've seen, but if you're going to do this, download Ed Jaffe's FLOWASM exit.
It makes life easier.
Adam Johanson
IMS Systems Programming
USAA