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

  1. Path: sparky!uunet!gatech!concert!borg!news_server!martinc
  2. From: martinc@grover.cs.unc.edu (Charles R. Martin)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Re: Blanks, REXX, and portability...
  5. Message-ID: <MARTINC.92Sep6224209@grover.cs.unc.edu>
  6. Date: 7 Sep 92 02:42:09 GMT
  7. References: <REXXLIST%92090620582680@UGA.CC.UGA.EDU>
  8. Sender: news@cs.unc.edu
  9. Organization: UNC Department of Computer Science
  10. Lines: 53
  11. In-reply-to: GOMBERG@UCSFVM.BITNET's message of 7 Sep 92 00:56:46 GMT
  12.  
  13. In article <REXXLIST%92090620582680@UGA.CC.UGA.EDU> GOMBERG@UCSFVM.BITNET (Dave Gomberg) writes:
  14.  
  15.    Could you show the code you find to be unobvious as to interpretation?
  16.  
  17.    PARSE EXPAND VALUE 'abtcd' WITH what?
  18.  
  19.    To me this means (assuming in the particular OS that abtcd is the same
  20.    as ab      cd  (tab to column 9)
  21.  
  22.    PARSE EXPAND VALUE 'ab      cd' WITH the same thing.     Dave
  23.  
  24. The problem would come with multiple applications.  Now, be kind on
  25. technical syntax here (um, is that spelled syntaxx for rexx?) because
  26. it's a new language for me and I don't have a manual at hand.  But
  27. consider 
  28.  
  29. parse expand value 'ab\tcd' with fld_a 01 02 rest_a
  30.  
  31. where you should interpret the "fld_a 01 02" as the appropriate field
  32. description for a two column field taking the first two characters.  I
  33. think we're agreed that the result should be
  34.  
  35. fld_a="ab"
  36. rest_a="      cd"  (modulo me counting blanks right on that line.)
  37.  
  38. so that if we did 
  39.  
  40. parse expand value 'ab\tcd' with line_a
  41.  
  42. then we'd expect line_a to equal fld_a||rest_a
  43.  
  44. But what if we instead 
  45.  
  46. parse value 'ab\tcd' with fld_b 01 02 rest_b
  47.  
  48. and follow that with
  49.  
  50. parse expand value rest_b with line_b
  51.  
  52. so that the expansion happens in the second parse and not the first?
  53. How many blanks must be added to replace the TAB character?  In the
  54. first case, we added 6 characters -- but to preserve the meaning of TAB
  55. as 'tab to column 9' we must add *8* characters in the second; suddenly
  56. we find that line_b DOES NOT equal fld_b||rest_b, which is aberrant.
  57. --
  58. Charles R. Martin/(Charlie)/martinc@cs.unc.edu/(ne crm@cs.duke.edu) 
  59. O/Dept. of Computer Science/CB #3175 UNC-CH/Chapel Hill, NC 27599-3175
  60. H/3611 University Dr #13M/Durham, NC 27707/(919) 419 1754
  61. ----------------------------------------------------------------------
  62. "I am he who walks the States with a barb'd tongue, questioning every
  63. one I meet,/Who are you that wanted only to be told what you knew
  64. before?/ Who are you that wanted only a book to join you in your
  65. nonsense?"  _Leaves of Grass_ xxiii.4.
  66.