Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!uflorida!haven!decuac!bacchus.pa.dec.com!bacchus!mwm From: mwm@raven.relay.pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.sys.amiga.tech Subject: Re: REXX command standards Message-ID: Date: 19 Nov 90 19:57:07 GMT References: <1990Nov14.033931.12883@evax.arl.utexas.edu> <1990Nov17.151516.14252@sisd.kodak.com> Sender: news@wrl.dec.com (News) Distribution: comp Organization: Missionaria Phonibalonica Lines: 53 In-Reply-To: cimshop!davidm@uunet.UU.NET's message of 18 Nov 90 23:21:38 GMT In article cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: Perhaps an alternative suggestion to an AREXX command standard would be a single command by which AREXX could ask the program in question what its command equivalents for the AREXX standard would be. The result of such a command would be a list that's indexed by the standard commands. Scripts desiring to be standard would work indirectly off this list whereas people not up to standardization yet would use the program's internal commands directly (because those are the one's they would most like learn first). This is a neophyte suggestion, so does this make sense? Yes, it does make sense. For sufficiently simple commands. Remember, commands are the _easy_ half of doing an ARexx design for an application. You have to decide what objects you're going to let the user manipulate, and how those objects are going to be represented to the Rexx script. After all, it's tweaking the text in the editor that's what makes Rexx scripts entertaining. Let's take simple example: copying a region of text from one place to another. What's involved? Selecting the source region. How does your editor select a single point in the text? Line/offset pairs? Offset into the entire text? By searching for it? How is the region represented? Two points? Point + length? Does length include newlines? Repeat much of this for selecting the insertion point. Now, creating a copy of the text to be copied. Do we need to store an intermediate somewhere? Does the editor provide a place for it? Does using that place destroy what was in it before? Can we use the system clipboard? Does the Rexx script have to copy the data? Now, insert the text. Can I just do a single command to insert the text in place, or do I need a loop of some kind? Do I need to position the cursor first? Does where the cursor is afterwards matter? Finally, delete the text you started with. Assuming you have to. You don't want to use only "incredibly simple" commands. That will leave the script writers doing everything in ARexx, which will be a performance hit when the editor can do it all at once. With that in mind, I suspect the correct thing to do is define a hi-level language for doing things that avoids things hard to do from a Rexx script, and then let editor authors provide a macro package to deal with this. Of course, if part of the command interface is that "macros can be invoked as commands", mg will never support it well.