home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!wrkgrp!ets
- From: ets@wrkgrp.COM (Edward T Spire)
- Subject: Re: PARSE wishlist/brainstorming
- Message-ID: <1992Sep2.160605.25142@wrkgrp.COM>
- Organization: The Workstation Group
- References: <1992Aug21.153953.796@wrkgrp.COM>
- Date: Wed, 2 Sep 92 16:06:05 GMT
- Lines: 53
-
- ets@wrkgrp.COM (Edward T Spire) writes:
- : anders@lise4.lise.unit.no (Anders Christensen) writes:
- : : In article <1992Aug20.154822.8057@hou.amoco.com> zjlc12@hou.amoco.com (Jerry Campbell) writes:
- : :
- : : > Why not add the STEM keyword to the Parse instruction?
- : : > Parse Var data STEM "hello" 1 stem. +3
- : :...
- : : Btw also files and stems could be used in the same way, instead of the
- : : stack:
- : : ADDRESS 'uni-shell' 'ls -l' TO STEM lines.
- : : do i=1 to lines.0
- : : parse var lines.i perm.i . user.i size.i . . . filename.i .
- : : end
- : :...
- : : If what you want to do, is to put the output of 'ls' into a stem named
- : : "record.", why not the following syntax?
- : : ADDRESS 'uni-shell' 'ls' TO STEM records.
- :
- : At the last ANSI discussion the "users" all liked these kinds of
- : suggestions, i.e., making formal within the language definition the
- : kind of numerically based stem collections that are commonly used
- : in many programming applications. The "implementers" in the group
- : were not so sure that we could jump right into that without due
- : consideration of the side effects.
- :
- : I would not be a good person to discuss the possible side effects
- : (I was on the side of the "users" in this...)
- :
- : Do we have a volunteer to present the counter-arguements?
-
- We have at least one. I received the following from an ANSI member
- for whom posting to this newsgroup is not convenient...
-
- : You asked on one forum for input on the negative aspects of
- : making stem conventions into language.
- :
- : One of the negatives that bothers me is that the customary
- : convention uses STEM.0 to hold the dimension. Whoever
- : invented that was probably not a mathematician nor a C
- : programmer. Element zero of an array is wanted by some
- : people. Given where we are, the only thing I can think of
- : is some convention like "If STEM.0DIM has a numeric value
- : then it is the dimension otherwise STEM.0 is the dimension".
- :
- : It is not important, but perhaps you might work this concern
- : into one of your appends, so see if others think
- : zero-indexing is important/solvable.
-
- I'll also add that if we get a "do over" construct, that count in .0
- is less important (although supporting it anyway may help porting
- existing code.)
-
- -Ed
-