home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!van-bc!panam!Leon_Davidoff
- From: Leon_Davidoff@panam.wimsey.bc.ca (Leon Davidoff)
- Newsgroups: comp.lang.rexx
- Subject: Curious Question
- Distribution: world
- Message-ID: <Leon_Davidoff.04fe@panam.wimsey.bc.ca>
- Date: 9 Sep 92 16:17:41 PST
- Organization: Commodore Computer Club / PaNorAmA
- Lines: 50
-
- I whipped up the following code to test something someone was talking
- about in a message. During my testing I noticed something strange.
-
- ------------
- /* Test1.rexx */
-
- Junk = ' x y'
-
- parse var Junk a b
-
- say a
- say b
- say c
-
- ------------
- Test1 output: x
- y
- C
- ------------
- /* Test2.rexx */
-
- Junk = ' x y'
-
- parse var Junk a b c
-
- say a
- say b
- say c
-
- ------------
-
- Test2 output: x
- y
-
-
- ------------
-
- What I would like to know is why b in Test1 is assigned the value ' y'
- while in Test2 the value is 'y'. I think I ran across this problem
- before and I found putting a variable Junk (which I never used) on the
- end of the parse statement made it behave the way I thought it should.
- Any ideas?
-
- I am using Arexx on a Rejuvenated Amiga 1000 running the 2.04 O/S.
-
-
- -- Via DLG Pro v0.992
-
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Leon
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-