View previous topic :: View next topic
|
Author |
Message |
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
donateeye,
your code presupposes the knowledge of the first word in the string.
My interpretation of Sundardudos's requirement is:
find the position of the second word in any string,
I find that enrico's solutions provide that info
Actually, they provide a complete answer to an unasked question:
what are the starting and ending positions of all words in a string.
If Sundardudos only wants to know the attributes of the second word,
he can modify enrico's code.
using your code, you would have to add a routine to run previous that
would extract the first word.
Now, analyzing the complete string (all the words),
is something that is often done -
but, if for some reason, the TS only wants the 2nd,
truncating enrico's code will provide the info. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Hi Robert
Quote: |
Why doesn't anyone mention "VERIFY", now with the option of starting in the middle of the string? |
because the manual version I was looking at did not have the 3 args version
and I would have had anyway to use a trick |
|
Back to top |
|
|
donateeye Warnings : 2 New User
Joined: 01 Jun 2007 Posts: 62 Location: chennai
|
|
|
|
Yes, Sundarkudos has clear said
If the first word in the source is xxxxxx then...
which clearly means that he should be aware of the first word...
considering that, the code just needs to find only the starting position of the second word.
Interesting is that, the man who started this topic is no where here to read all the suggestions and codes for him.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
donateeye,
you are pounding sand.
one assumes the program is to handle more than one input,
thus the first word is not always known.
enrico and the other seniors do not write code for simple accept/display cobol programs.
their examples are an attempt to drag those
with little experience
out of the dark chasm of ignorance that they seem to reside
and provide insight to the world of professional programming. |
|
Back to top |
|
|
donateeye Warnings : 2 New User
Joined: 01 Jun 2007 Posts: 62 Location: chennai
|
|
|
|
well.... you are right.... My apologize to enrico.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
donateeye wrote: |
well.... you are right.... My apologize to enrico.... |
if that is sincere,
then I take back my comment about your membership and maturity.
have a good weekend. |
|
Back to top |
|
|
donateeye Warnings : 2 New User
Joined: 01 Jun 2007 Posts: 62 Location: chennai
|
|
|
|
It is serious
Happy weekend everyone.... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
OK I' ll clean up the topic from the unpleasant remarks |
|
Back to top |
|
|
|