home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / rexx / 1320 < prev    next >
Encoding:
Text File  |  1992-11-16  |  3.0 KB  |  65 lines

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