Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!usc!isi.edu!gremlin!charming.nrtc.northrop.com From: jpl@charming.nrtc.northrop.com (Jeff Lankford) Newsgroups: comp.lang.rexx Subject: Re: need a REXX-flavored version of getopt() Summary: I have one, what have you got to trade? Message-ID: <9091@gremlin.nrtc.northrop.com> Date: 28 Aug 90 21:31:18 GMT References: Sender: news@gremlin.nrtc.northrop.com Reply-To: jlankford@nrtc.northrop.com (Jeffrey P. Lankford) Distribution: comp Organization: Northrop Research & Technology Center, Palos Verdes, CA Lines: 24 In article lynn@phx.mcd.mot.com (Lynn D Newton) writes: >Has anyone out there in REXX-land written a function that more or >less duplicates the functionality of the UNIX getopt() library >call, which parses command line values in the same way (from a >black box point-of-view) as is customarily done in UNIX? I have several VM/CMS REXX scripts that emulate a number of Unix commands. To support this, I implemented several common library functions, of which getopt(3) was one (I slightly expanded the acceptable input syntax). I also implemented the getopt(1) command, which essentially just invokes the getopt(3) function. I suppose you want Arexx for MeSsy-DOS, but I imagine that any conversion would be trivial, since my getopt(3) function uses standard built-in functions to manipulate strings. It's fairly trivial (about 70 lines including comments) and you could probably implement one from scratch. However, I'm feeling in a mercenary mood today, so I'll require a nifty* function in exchange before I distribute. * nifty: something that helps change the archaic IBM environment into a useful contemporary programming environment. Jeff Lankford Northrop Research and Technology Center 213/544-5394 One Research Park, Palos Verdes Peninsula, CA 90274