Paul Gilmartin wrote:
In a recent note, Rob Scott said:

Date:         Tue, 17 Jan 2006 17:27:42 -0500

"Note: once you execute "address ISREDIT", there is no need to put
"ISREDIT" in front of every command."

Maybe not - but I think it is good practice - it protects you from
problems if you happen to ADDRESS another environment when you next
change the REXX exec. Admittedly this might not be a big issue with
simple edit macros - but in larger REXX execs you can easily shoot
yourself in the foot.

I also think that it makes the code easier on the eye and easier to
maintain.

You could make the same argument for putting a USING or a CSECT
in front of every other assembly language statement.

And it wouldn't be true there, either.

(Although HLASM reports effective USINGs at the top of each page.)

And, following up on teD's reasoning, if I have a large
chunk of statements in another environment, I'll habitually
make a PROCEDURE out of it.  Since the previous addressing
environment is restored on return, everything desired
happens automatically.

No, I don't put a restoring ADDRESS ... either before the
RETURN or after the CALL (although Ed Jaffe might like it
that way.)

Did I hear (read) my name??

There is a fundamental difference between ADDRESS in REXX and USING in assembler. USING in HLASM is positional and applies at compile time only. If you CALL a subroutine and return, your USINGs in effect at the CALL point haven't changed. OTOH, ADDRESS in REXX is executable. It's changed at run time via the instruction path. Seems like it ought to be stackable. PUSH ADDRESS / CALL / POP ADDRESS. (Of course, in REXX PUSH and POP are already taken. Maybe something like SAVE/RESTORE ala ISPF. But you get the idea.) Or maybe subroutine linkage should _automatically_ save/restore it. It happens already when invoking another REXX procedure. Why not within a procedure?

--
-----------------------------------------------------------------
| Edward E. Jaffe                |                                |
| Mgr, Research & Development    | [EMAIL PROTECTED]    |
| Phoenix Software International | Tel: (310) 338-0400 x318       |
| 5200 W Century Blvd, Suite 800 | Fax: (310) 338-0801            |
| Los Angeles, CA 90045          | http://www.phoenixsoftware.com |
-----------------------------------------------------------------

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to