🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: psu.vm.rexx
Article #1

Re: Programming style

#1
From: VM Weenie
Date: Fri, 17 Nov 1989 16:48
46 lines
2444 bytes



In article <89321.090814CJS@PSUVM.BITNET>, <CJS@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
Technical Details
Message-ID: <89321.114816PJB900@PSUVM.BITNET>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!attcan!uunet!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!pjb900
References: <89320.222332JXS118@PSUVM.BITNET> <89321.090814CJS@PSUVM.BITNET>

Show Full Headers
Complete Article Headers
Message-ID: <89321.114816PJB900@PSUVM.BITNET>
Subject: Re: Programming style
Date: Fri, 17 Nov 1989 16:48:16 +0000
From: PJB900@PSUVM.BITNET (VM Weenie)
References: <89320.222332JXS118@PSUVM.BITNET> <89321.090814CJS@PSUVM.BITNET>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!attcan!uunet!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!pjb900
Newsgroups: comp.lang.rexx,psu.vm.rexx
Organization: Penn State University
Lines: 45