home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
- From: SEB1525@MVS.draper.com (Steve Bacher)
- Subject: Re: Relaxing of arg string passing...
- Message-ID: <19921116105248SEB1525@MVS.draper.com>
- Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
- Nntp-Posting-Host: mvs.draper.com
- Organization: Draper Laboratory
- References: <9211151359.AA05246@SERVER.uwindsor.ca>
- Date: Mon, 16 Nov 1992 15:52:00 GMT
- Lines: 52
-
- In article <9211151359.AA05246@SERVER.uwindsor.ca>,
- ophof@SERVER.UWINDSOR.CA (Scott Ophof) writes:
-
- >On Mon, 21 Sep 1992 14:59:52 MEZ Otto Stolz
- > <RZOTTO%DKNKURZ1.BITNET@uga.cc.uga.edu> said:
- ...
- >>Let us keep in mind that host commands are processed by the respective
- >>host system that will impose its own rules on them. Hence, differences
- >>between genuine REXX interfaces and commands addressed to the host system
- >>inevitably arise. We can neither blame the REXX implementors for them,
- >>nor can we expect the forthcoming standard to mend them.
- >
- >>Hence, Scott is asking too much.
- >
- >Maybe I don't know what I'm asking? :-)
- >As I see it, the host system passes the command line data to the
- >invoked program, which then does whatever it wants with that data.
- >Do I see this wrong?
- >And are there any opsyses that (might) interpret commas on the
- >command line in some special way?
-
- Well, take Unix (please). The command line passed to a program by
- the Unix shell gets cooked quite a bit before the command ever sees it.
- Wildcard expressions are expanded - even if you never intended them
- to represent file names - variables are substituted, piping and
- redirection operators are analyzed, etc. Then the remaining argument
- string is parsed into tokens and fed to your program as a vector of
- character strings.
-
- If you wanted your program to see one huge character string exactly
- as the user intended, the user would have to enclose the entire thing
- inside quotes. Even then, there are differences in the ways that the
- various Unix shells handle backslashes, question marks and bangs.
-
- Now, assuming that the user wanted REXX and not the shell to see the
- commas, said user would encase the argument in quotes. In which case
- I think the user would be behaving in a reasonable manner if (s)he
- expected the REXX exec to see the string as a whole, and not as a
- specification of multiple arguments. Otherwise, if the user wanted
- to pass a comma to the REXX exec in a way that told it not to treat
- the comma as a REXX delimiter but really part of the low-level data,
- yet another level of quoting would be needed.
-
- In sum, what you see on the terminal isn't necessarily what you get, and
- what you get is determined in a very significant way by the operating
- system shell. Most important, the REXX exec has no idea of what the
- user originally typed. It sees only what the shell feeds it, and can
- make no assumptions about what was typed on the raw console.
-
- --
- Steve Bacher (Batchman) Draper Laboratory
- Internet: seb@draper.com Cambridge, MA, USA
-