Path: utzoo!attcan!uunet!bu.edu!rpi!leah!wfh58 From: wfh58@leah.Albany.Edu (William F. Hammond) Newsgroups: comp.sys.amiga Subject: Re: arexx ARG() Summary: Anything on the shell command line is a single arg string Message-ID: <3103@leah.Albany.Edu> Date: 30 May 90 17:47:03 GMT References: <30325@cup.portal.com> Reply-To: wfh58@leah.albany.edu.UUCP (William F. Hammond) Organization: Dept of Math & Stat, SUNYA, Albany, NY Lines: 28 In query <30325@cup.portal.com> MJB@cup.portal.com (Martin J Brown-Jr) writes: > . . . >I am currently having problems with arg(): >The file foo.rexx has as its only line: > say arg() >The following CLI line: > foo.rexx >results in a "0" on the screen. Which is correct, right? >The following CLI line: > foo.rexx a b c d e >results in a "1" on the screen. Shouldn't it be a "5"? Anything after "foo.rexx" becomes a single argstring which can be parsed. Try this foo.rexx: /* ... */ parse arg w1 w2 w3 w4 call alpha(w1, w2, w3) exit alpha: procedure say arg() say arg(1) say arg(2) say arg(3) return /* end of foo.rexx */ Now try: (1) rx foo This is a little test. and (2) rx foo "This is a little test." (Surprised?) -- Bill