On Sun, 26 Feb 2017 14:41:14 -0600, William W. Collier wrote:

>A recent note asked how, in REXX, to parse a record in this format:
>"word1 word2.word3 word4:word5.word6 word7 hh.mm.ss"
>    ...
>  A friend, Harry Elder (hik...@gmail.com), offers this solution:
>input = "word1 word2.word3 word4:word5.word6 word7 hh mm ss"; 
>    ...
Well, gee, I think he changed the statement of the problem.  Isn't that 
cheating?

I admit, I did something similar myself in the compact solution I tendered,
and for which I was admonished for needless complexity. But my intent
was to generalize.  Did Peter intend that the words be separated only by
single blanks, or did he want to handle tne case of possible multiple blanks,
likely if theinput data are column-aligned?

Yes, I was also dismayed to encounter the behavior of PARSE once.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to