Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP code syntax coloring in HTML
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00355687
Message ID:
00361284
Vues:
41
George,

You beat me to it, I was thinking the same thing ;). So I tested while you posted. Here is an example:
#DEFINE AS_DEFINE CHR(13)+CHR(13)
cAsVar = CHR(13)+CHR(13)

lnstart = SECONDS()
? 'Test with straight code'
FOR N = 1 TO 100000
	x = CHR(13)+CHR(13)
ENDFOR
lnstop = SECONDS()
? lnstop - lnstart

lnstart = SECONDS()
? 'Test as a var'
FOR N = 1 TO 100000
	x = cAsVar
ENDFOR
lnstop = SECONDS()
? lnstop - lnstart

lnstart = SECONDS()
? 'Test as define'
FOR N = 1 TO 100000
	x = AS_DEFINE
ENDFOR
lnstop = SECONDS()
? lnstop - lnstart
>>George,
>>
>>Thanks for this suggestion. I'm thinking about several additional #define at the top of my program and also local variables in aparser. That's a good point.
>>
>>BTW, now it runs in ~0.1 sec.
>>
>Well, don't use any functions in those #DEFINES, because they'll be evaluated at run time. Anything calling either CHR() or SPACE() should be a local.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform