Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Misleading message
Message
 
 
À
22/07/2002 00:00:31
Information générale
Forum:
Level Extreme
Catégorie:
Autre
Divers
Thread ID:
00680604
Message ID:
00681055
Vues:
28
>>>>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform