Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practices
Message
De
09/02/2013 13:46:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
09/02/2013 09:47:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01565478
Message ID:
01565633
Vues:
90
>>Thank you for the information. Do you know if VFP9 did anything to change your test results?
>
>I haven't tested in VFP 9. I just poked around to see whether I could turn that test code up, but I didn't find it in a first look.

What I did can't really count as a test, because I didn't benchmark it. I've replaced the couple of dozen Set Classlib and Set Procedure commands with a call to setproc.prg, generated by the routine below. I haven't noticed any difference in speed either way. This, however, makes sure that every .vcx and .prg you have in the project are included in set("procedure") and set("classlib")... which is not necessarily what you want.
***
***	gen_setproc.prg
***

* 	13.05.04 11:27:59
* 	Visual FoxPro 08.00.0000.3117 for Windows

***
*** ----------------------------------
***
#DEFINE hLF CHR(10)
#DEFINE hCR CHR(13)
#DEFINE hCRLF CHR(13)+CHR(10)
#DEFINE hTab	CHR(9)

LOCAL a[1], i, lcComma, lctext

TEXT TO lctext NOSHOW TEXTMERGE

***
***	setproc.prg
***

* 	<<datetime()>>
* 	<<version()>>
* Generated by <<program()>>

***
*** ----------------------------------
***

	Set Procedure To
	Set Classlib To
ENDTEXT
cTab=hTab
lcSemi=";"
SELECT NAME FROM my.pjx INTO ARRAY a WHERE TYPE="P" 
ASORT(a)
lctext = lctext + hCR+"Set Procedure To	"
lcComma=""

FOR i=1 TO ALEN(a)
	lcName=CHRTRAN(a[i], CHR(0), "")
	IF NOT FILE(lcName)
		LOOP
	ENDIF
	*[2007/09/28 22:59:16] dragan - check for weirder names
	IF " "$lcName OR OCCURS(".", lcName)>1
		lcName=CHR(34)+lcName+CHR(34)
	ENDIF
	lctext = lctext + lcComma+lcSemi+hCRLF+cTab+lcName
	lcComma=","
ENDFOR
lctext = lctext + hCR + hCR+"Set Classlib To	"
SELECT NAME FROM ids.pjx INTO ARRAY a ;
	WHERE TYPE="V" AND NOT exclude
ASORT(a)
lcComma=""
FOR i=1 TO ALEN(a)
	lcName=CHRTRAN(a[i], CHR(0), "")
	IF NOT FILE(lcName)
		LOOP
	ENDIF
	*[2007/09/28 22:59:16] dragan - check for weirder names
	IF " "$lcName OR OCCURS(".", lcName)>1
		lcName=CHR(34)+lcName+CHR(34)
	ENDIF
	lctext = lctext + lcComma+lcSemi+hCRLF+cTab+lcName
	lcComma=","
ENDFOR
USE IN ids
lctext = lctext + hCR+ hCR
STRTOFILE(lctext, "source\programs\setproc.prg")

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform