The SIGNAL statement unwinds the stack in a very disruptive fashion; its behavior is unlike GOTO in any language that I am familiar with. Use it for anything but exception handling at your peril.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Bob Bridges <[email protected]> Sent: Friday, March 15, 2024 12:30 PM To: [email protected] Subject: Re: Rexx numeric digits and scientific notation question My problem is that I think of SIGNAL as a sort of careless GOTO. No doubt it's often used that way (and really I have nothing against GOTO, when used in moderation), but since I know it isn't ~exactly~ a GOTO, in practice I don't use it at all because I don't feel I understand exactly what it does. I don't trust it, and I haven't yet bothered to learn to be comfortable with it. --- Bob Bridges, [email protected], cell 336 382-7313 /* As a father, I have a vested interest in seeing my children do well in school. If they don't, they won't graduate, and will probably wind up living in my house until they are thirty years old. This will interfere with my plan to reach retirement age without killing another human being. -W Bruce Cameron, _Study Habits_ (2001) */ -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Rupert Reynolds Sent: Thursday, March 14, 2024 22:22 As a style thing, I'd be quite happy to initialise everything inline once, but if I need to re-initialise then I'd want to be sure everything is the same second time around, so I'd probably use 'procedure expose' to initialise (and 'signal on novalue' as well, to avoid being caught out by different behaviour on the second time around). There's nothing wrong with 'signal', of course, except that a lot of people reading the code won't be expecting it :-) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
