| William M. Klein 2004-05-29, 3:30 am |
| "David Frank" <dave_frank@hotmail.com> wrote in message
news:6eVtc.34937$Ol3.23233@twister.tampabay.rr.com...
>
<snip>
> Not so fast, the objective is to find the index of the last word
> and as my challenge at http://home.cfl.rr.com/davegemini/pli_cant.faq
> clearly shows, the subsequent output breaks the output into
> 2 lines...
> The quick brown fox jumps over the lazy dog's
> back.
>
>
Just in case anyone missed it ...
Compare the following from
http://home.cfl.rr.com/davegemini/pli_cant.faq
with what is written above,
"18. CAN find last word index in trailing blank text using a loop"
Notice it does NOT say anything about "output" - much less two lines of output.
The
SPECIFICATION
was for a way to find "the last word ... using a loop"
The COBOL code (snipped from this post) did EXACTLY that.
Apparently, what Mr. Frank thinks is a "specification" is:
- brief (incomplete) summary
- code in another language
- sample output
It appears, that the ACTUAL specification that he *meant* to say (and talk about
USELESS facility) is:
Given an internal program "literal" (exactly 80 bytes long) of
"The quick brown fox jumps over the lazy dog's back. "
Then, find the last word (defined by spaces before and after it) and you MUST
use a programming construct of a "loop"
Then output all of the text before the word on one line - and the final "word"
on a separate line.
If that is actually what he wants, then he should say so ...
If he wants something else, then he should learn how to write an application
specification!
Once he actually modifies his specification to say what he wants, I am certain
that it will take about two minutes to code it in COBOL (or any other
programming language - that has a loop construct).
--
Bill Klein
wmklein <at> ix.netcom.com
|