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