Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where should all my procedure be in?
Message
De
25/05/1998 18:16:30
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
25/05/1998 03:27:03
Tan Gay Cheong
Cybercomp Computer Services
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00101486
Message ID:
00101754
Vues:
48
>For functions too? Am I right by SET FUNCTION to myprog?
It seems you're missing some fundamentals here. There is no need to create a large procedure file with lots of procedures and functions in it. Create each procedure as a separate .PRG file. Do not start each of these files with the keywords procedure or function. Sometimes you might need to make an object with methods and properties that are specific to that object. You should not create an object just to have a place to put all procedures and functions (as methods). Having all of the prgs separate will allow you to more quickly edit and recompile those that you make changes to.

Don't do this...

MYPROC.PRG
Procedure proc1
blah
blah
blah
return

Function func1
blah
blah
blah
return blah

do this...

proc1.prg
blah
blah
blah
return

func1.prg
blah
blah
blah
return blah

The set procedure to command actually takes some time. You can work this way without any problems. There is a slight performance problem as Fox/VFP try to find the files on the drive. (Its so small its not worth worrying about) When it comes time to compile to a final exe, the performance will jump right back up.

Good luck.

Mike Yearwood
GE Capital Consulting
makers of Visual Maxframe Professional
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform