Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maximum class length
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01561935
Message ID:
01561947
Vues:
120
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform