Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!apple!amdahl!key!lfk From: lfk@key.key.amdahl.com (Lynn Kerby) Newsgroups: comp.lang.rexx Subject: Re: need a REXX-flavored version of getopt() Message-ID: Date: 11 Sep 90 04:07:46 GMT References: <90239.171548BOYDJ@QUCDN.BITNET> <147@rufus.UUCP> Sender: lfk@key.COM Reply-To: lfk@uts.amdahl.com Distribution: comp Organization: Amdahl Corporation - KCL, Fremont, CA Lines: 29 In-reply-to: drake@drake.almaden.ibm.com's message of 5 Sep 90 06:33:21 GMT In article <147@rufus.UUCP> drake@drake.almaden.ibm.com writes: > Actually, getopt() is not entirely trivial to write/simulate in REXX. > Doable, to be sure, but not trivial. REXX "parse" is perfect for > doing first level parsing of command lines for systems with a CMS-ish > command syntax style. In CMS, for example, it is conventional for command > lines to look sort of like: > Well I don't know that I can add much to this discussion, but I am glad to see that I am not crazy. The first time I went to write a Rexx program in AREXX that required UNIX style options, I though I must have been doing something wrong. It is definitely non-trivial to do right (I won't guarantee that I did it right either). I don't have my code handy here, but I recall that it became easier to parse the options into a variable within a loop. After all I had heard about REXX's powerful string parsing capabilities from various sources I was dissapointed. > SO, getopt() is something that it'd be nice to have, even in REXX, > on systems with unix-like command syntax. For that matter, something > similar would be quite nice even on CMS; sure, Parse is great for: I would love to see an implementation of REXX that has getopt()! It may even be useful (at least for those with a UNIX inclination) on CMS or TSO! -- Lynn Kerby, Amdahl Corporation: lfk@key.amdahl.com or {...}amdahl!key!lfk <<<<---------------------------- DISCLAIMER ---------------------------->>>> <<<< Any and all opinions expressed herein are my own. My >>>> <<<< employer doesn't pay me for my opinion! >>>>