Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
500 char String too long?
Message
 
To
16/06/2011 18:51:27
Victor Chignes
Inteliventas
Peru
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01514836
Message ID:
01514842
Views:
70
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform