Re: REXX Error (Was: action in UK33496)

2008-04-29 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on 04/21/2008 at 09:18 PM, Paul Gilmartin [EMAIL PROTECTED] said: Reference to an uninitialized variable is a failure. Only if NOVALUE is enabled. The classic behavior with NOVALUE disabled is useful. I have _never_ coded a SIGNAL. Partly hangover from the 3 decades

Re: REXX Error (Was: action in UK33496)

2008-04-29 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on 04/23/2008 at 12:04 AM, Ted MacNEIL [EMAIL PROTECTED] said: LEAVE ITERATE only manage the current level. Hogwash! -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have

Re: REXX Error (Was: 'action' in UK33496)

2008-04-23 Thread Gary Green
re Of course, being 51 may have something to do with it. Or as we say, C.R.S ;) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search

Re: REXX Error (Was: action in UK33496)

2008-04-23 Thread Patrick O'Keefe
On Wed, 23 Apr 2008 00:15:59 +, Ted MacNEIL [EMAIL PROTECTED] wrote: ... Of course, being 51 may have something to do with it. ... Ah. I see. Your mind is still too young and unruly. Well, don't worry. You'll grow out of it. Pat O'Keefe

Re: REXX Error (Was: action in UK33496)

2008-04-23 Thread Edward Jaffe
Paul Gilmartin wrote: Consider: /* I do this all the time... */ do phonyblock = 1 for 1 ... if Bailout then leave phonyblock ... end phonyblock o I put a name = 1 for 1 on all my large blocks, and use a matching end name - the interpreter checks that my ends match my dos. -

Re: REXX Error (Was: action in UK33496)

2008-04-23 Thread Edward Jaffe
Ted MacNEIL wrote: I should have said: LEAVE ITERATE should only be used to manage the current level. Use flags/semiphores to continue to exit. At least, that way you know what you have. The intent of structured programming techniques, since their need was recognized 40 years ago, has

Re: REXX Error (Was: action in UK33496)

2008-04-23 Thread Ted MacNEIL
Languages like REXX and Structured HLASM provide LEAVE and ITERATE as a means of reducing program complexity. Both statements allow for the specification of which of several nested constructs is to be exited or iterated. This facility is important and, when used appropriately, will reduce

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Patrick O'Keefe
On Mon, 21 Apr 2008 21:18:17 -0500, Paul Gilmartin [EMAIL PROTECTED] wrote: ... My technique for picking up the pieces after a failure is to improve the code so that it no longer fails. A nonzero return code is not a failure. Reference to an uninitialized variable is a failure. I couldn't

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Ted MacNEIL
I think abuse of ITERATE and LEAVE to be a much milder crime. I don't know what you mean by abuse, but when I studied modular/structured programming at the University of Waterloo, these were considered valid constructs. Sometimes, you've done all you can with the data, so you have to either

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Patrick O'Keefe
On Tue, 22 Apr 2008 22:41:49 +, Ted MacNEIL [EMAIL PROTECTED] wrote: I think abuse of ITERATE and LEAVE to be a much milder crime. I don't know what you mean by abuse, but when I studied modular/structured programming at the University of Waterloo, these were considered valid constructs.

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Ted MacNEIL
In fact, I'm not sure that I would ever use SIGNAL to break out of a complex nested loop structure even if it DID greatly simplify the logic. It doesn't necessarily. You can end up with indeterminate results. In fact, I don't even like named LEAVE; I leave each level seperately. LEAVE

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Edward Jaffe
Ted MacNEIL wrote: LEAVE ITERATE only manage the current level. LEAVE and ITERATE are for whichever level you specify. The default, if no operand is specified, is the current level. -- Edward E Jaffe Phoenix Software International, Inc 5200 W Century Blvd, Suite 800 Los Angeles, CA

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Ted MacNEIL
LEAVE ITERATE only manage the current level. LEAVE and ITERATE are for whichever level you specify. The default, if no operand is specified, is the current level. You're correct, and I realised it as soon as I sent the message. I have never supplied an operand, so I forgot. Of course,

Re: REXX Error (Was: action in UK33496)

2008-04-22 Thread Paul Gilmartin
On Tue, 22 Apr 2008 18:18:14 -0500, Patrick O'Keefe wrote: On Tue, 22 Apr 2008 22:41:49 +, Ted MacNEIL [EMAIL PROTECTED] wrote: I think abuse of ITERATE and LEAVE to be a much milder crime. I don't know what you mean by abuse, but when I studied modular/structured programming at the

REXX Error (Was: action in UK33496)

2008-04-21 Thread Patrick O'Keefe
On Mon, 21 Apr 2008 11:15:05 -0500, Paul Gilmartin [EMAIL PROTECTED] wrote: ... Every well-designed language, application, programming system should have a way to force an error. IDCAMS has such; HLASM has MNOTE; zSeries has x'00'. Rexx lacks such; I resort to dividing by zero or accessing an

Re: REXX Error (Was: action in UK33496)

2008-04-21 Thread Paul Gilmartin
On Mon, 21 Apr 2008 15:44:20 -0500, Patrick O'Keefe wrote: Maybe I misunderstand what you would want REXX to do. If you're talking about some way of invoking an On-condition block, REXX obviously has it: you SIGNAL or CALL the block's label. If you want to verify an exec's ability to handle an