Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Misleading message
Message
 
 
To
22/07/2002 00:00:31
General information
Forum:
Level Extreme
Category:
Other
Miscellaneous
Thread ID:
00680604
Message ID:
00681055
Views:
27
>>>>I would recomend that you use CEILING(SQRT(OCCURS(SPACE(1),lcStr)))) to make overall size of the expression shorter. With long source string you could exceed 8,192 characters limit on the command line size.
>>>
>>>Ok, so basically, this is the new formula.
>>
>>Yes, it determines how many times you've to run STRTRAN(..., SPACE(2), SPACE(1)) on the source string to eliminate extra spaces in the worst case scenario.
>
>Can you send the entire line with this adjustment? I can't find a way to make it fit.

There was extra closing parenthesis at the end of expression, sorry. Here's working code.
? EVALUATE(REPLICATE([STRTRAN(], ;
             CEILING(SQRT(OCCURS(SPACE(1),lcStr))))  + [lcStr] + ;
       REPLICATE([, SPACE(2), SPACE(1))], ;
             CEILING(SQRT(OCCURS(SPACE(1),lcStr)))) )
* Or for readability you can split in into two lines
lnRepCount = CEILING(SQRT(OCCURS(SPACE(1),lcStr)))
? EVALUATE(REPLICATE([STRTRAN(], lnRepCount) + [lcStr] + ;
			REPLICATE([, SPACE(2), SPACE(1))], lnRepCount))
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform