>>So, it's possible to reduce series of spaces (or any other characters) down to 1 with a fixed number of STRTRAN() calls:
>>
>>- up to and including 4,096 spaces with 7 STRTRAN() calls
>>- up to and including 1,048,576 spaces with 9 STRTRAN() calls
>
>I've always done this by
>
>do while "{2**n spaces}"$string
> string=strtran(...)
>enddo
>
>But now... if the limit to reduce() is 64K, I'd chop the string into pieces smaller than that, and reassemble the results. Should be faster than going it all in Fox.
I just ran some tests with 64K spaces:
Spaces: 2^16 Passes: 1000 Milliseconds: 4507 (REDUCE in FoxTools.FLL)
Spaces: 2^16 Passes: 1000 Milliseconds: 1352 (Reduce_Successive)
Spaces: 2^16 Passes: 1000 Milliseconds: 16634 (Reduce_Loop)
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up