At 4:23 PM -0700 8/24/99, [log in to unmask] wrote:
>Barry Lake wrote:
>
>> How about this...
>>
>> setvar _test "this is a test string"
>> setvar w_count wordcnt(_test)
>>
>> You can "take the 'word' route" as long as you're on an MPE release that
>> has the wordcnt function.
>
><sigh> i can't do 'wordcnt' as i'm only on 5.5pp6 <sigh> - d
Oops, I had sent my follow-up reply refining my original reply before I saw
this. Of course, without the wordcnt function the solution is more klunky,
but it still is possible:
setvar _test "this is a test string"
setvar i 0
setvar _continue true
while _continue
setvar i i + 1
setvar _word word(_test, ' ', i)
if len(_word) > 0
if i = 1
setvar _temp _word
else
setvar _temp _temp + ' ' + _word
endif
else
setvar _continue false
endif
endwhile
setvar _test _temp
Barry Lake [log in to unmask]
Tidal Software, Inc. www.tidalsoft.com
(650)493-4122