MJB@cup.portal.com (Martin J Brown-Jr) (05/30/90)
I am using v1.1 (latest?) of Txed.
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"?
What am I missing here?
Thanx for any assistance!
- MJB -
USENET: mjb@cup.portal.comwfh58@leah.Albany.Edu (William F. Hammond) (05/31/90)
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
MJB@cup.portal.com (Martin J Brown-Jr) (05/31/90)
**** correction ****
In the firt line of my original posting I said:
(^^^ = first ) I am using V1.1 of TxEd.
That should have been:
I am using v1.1 of Arexx.
- MJB -cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) (06/01/90)
In article <30325@cup.portal.com> MJB@cup.portal.com (Martin J Brown-Jr) writes: >I am using v1.1 (latest?) of Txed. The latest version is 2.2 -- --Chuck McManis Sun Microsystems uucp: {anywhere}!sun!cmcmanis BIX: <none> Internet: cmcmanis@Eng.Sun.COM These opinions are my own and no one elses, but you knew that didn't you. "I tell you this parrot is bleeding deceased!"