Path: utzoo!attcan!uunet!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!pjb900 From: PJB900@PSUVM.BITNET (VM Weenie) Newsgroups: comp.lang.rexx,psu.vm.rexx Subject: Re: Programming style Message-ID: <89321.114816PJB900@PSUVM.BITNET> Date: 17 Nov 89 16:48:16 GMT References: <89320.222332JXS118@PSUVM.BITNET> <89321.090814CJS@PSUVM.BITNET> Organization: Penn State University Lines: 45 In article <89321.090814CJS@PSUVM.BITNET>, says: CJS posted some useful tips and suggestions. I'd like to follow up on a few of those. >> It is not merely a matter of style . . . it is proper coding vs. >>improper coding. (Or GOOD vs. BAD, or RUDE vs. POLITE or SMART vs. >>STUPID.) >> >>Any REXX EXEC or XEDIT macro that issues CMS and CP commands that is >>going to be used by other than the author should have "ADDRESS COMMAND" >>at the beginning, and should make external calls properly. >Here is an excerpt from an unfinished "REXX Programmer's Guide". >The statement "address command" (a synonym is address '') Don't forget the null string! "address" by itself is not the same thing. Without the null you just switch to the previous environment. It's also a good idea for the REXX EXEC or XEDIT macro to leave the calling environment unchanged unless of course that's what it's for. No mucking around with the stack unless ya leave it like ya found it! Suggestion: 'MAKEBUF' on entering and 'DROPBUF' on leaving. GLOBALs and SETs should be restored before leaving. CJ points out the benefits of having EXECs work with CMS return codes. Same thing goes for XEDIT. Macros should use the XEDIT return codes. PLEASE include comments and signal on error, signal on novalue, etc for those of us who try to debug a virtual machine after some freshman mucked around with your cute EXEC. Also, will the EXEC function correctly in CMS subset? If not, PLEASE document the fact. It's nice to know that your program is making the rounds and everybody thinks it's really neat but sooner or later it's going to cause problems after it's been passed around among the users a few hundred times. Geez, I didn't mean to sound like Chuck Hannum. Sorry about that. - Peter