Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
500 char String too long?
Message
 
À
16/06/2011 18:51:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Divers
Thread ID:
01514836
Message ID:
01514842
Vues:
71
It should work, maybe some memory problem? (are you declaring your vars?)

I ran this code three times and I've got:
LOCAL lcField, lnItem, lnRepeats, lnRepeat, lcValue
LOCAL laArray(100)

RAND(-1)
FOR lnItem = 1 TO 100
	lcValue			= ''
	lnRepeats		= RAND() * 5000 + 1
	FOR lnRepeat = 1 TO lnRepeats
		lcValue			= lcValue + SYS(2015)
	NEXT lnRepeat
	laArray[lnItem]			= lcValue
NEXT lnItem

lcValue			= ''
FOR lnItem = 1 TO 100
	lcValue			= lcValue + laArray[lnItem] + ','
NEXT lnItem

? LEN(lcValue)
1) 2.660.750
2) 2.443.080
3) 2.788.370

and changing the array to 1000 elements I've got 24.882.460
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform