Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum class length
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01561935
Message ID:
01561947
Views:
119
>Was wondering if anybody knows the maximum legal length for a class name off the top of their head?
>
>I'm putting a limit on an app I'm writing to scan classes at 128 characters ... but if there's a real limit, I'd prefer to use it.

254?
clear all
clear
local i, lcName

for i = 100 to 500
	lcName = Replicate('x', i)
	text to lcTest noshow flags 1 pretext 1 + 2 + 4 textmerge
		local loObject
		loObject = NewObject('<<lcName>>')
		? Len('<<lcName>>'), loObject.Name
		
		define class <<lcName>> as session
		enddefine
	endtext
	ExecScript(lcTest)

next i
"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