home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 982 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.2 KB

  1. Path: sparky!uunet!van-bc!panam!Leon_Davidoff
  2. From: Leon_Davidoff@panam.wimsey.bc.ca (Leon Davidoff)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Curious Question
  5. Distribution: world
  6. Message-ID: <Leon_Davidoff.04fe@panam.wimsey.bc.ca>
  7. Date: 9 Sep 92 16:17:41 PST
  8. Organization: Commodore Computer Club / PaNorAmA
  9. Lines: 50
  10.  
  11. I whipped up the following code to test something someone was talking 
  12. about in a message.  During my testing I noticed something strange.
  13.  
  14. ------------
  15. /* Test1.rexx */
  16.  
  17. Junk = '  x y'
  18.  
  19. parse var Junk a b
  20.  
  21. say a
  22. say b
  23. say c
  24.  
  25. ------------
  26. Test1 output: x
  27.                y
  28.               C
  29. ------------
  30. /* Test2.rexx */
  31.  
  32. Junk = '  x y'
  33.  
  34. parse var Junk a b c
  35.  
  36. say a
  37. say b
  38. say c
  39.  
  40. ------------
  41.  
  42. Test2 output: x
  43.               y
  44.               
  45.  
  46. ------------
  47.  
  48. What I would like to know is why b in Test1 is assigned the value ' y'
  49. while in Test2 the value is 'y'.  I think I ran across this problem 
  50. before and I found putting a variable Junk (which I never used) on the 
  51. end of the parse statement made it behave the way I thought it should.
  52. Any ideas?
  53.  
  54. I am using Arexx on a Rejuvenated Amiga 1000 running the 2.04 O/S.
  55.  
  56.  
  57. -- Via DLG Pro v0.992
  58.  
  59. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Leon
  60. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  61.