Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recursive Program - Help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00499372
Message ID:
00499399
Vues:
16
>>I have a project that has a conv53_main.prg (which is my main) which has the following two statements:
>>
>>set proc conv53.prg
>>do conv53 with lreturn_code
>>
>>There is a conv53.prg in the project that has a conv53 procedure. But the "do" above starts back at the top of the conv53_main.prg, it does not execute the conv53 procedure in conv53.prg - WHY?
>>
>>Brenda
>
>
>Don't know, I just tried it and it worked correctly for me. But one question: Is there more than one procedure/function in conv53.prg? Even if there is, unless they're being called by your "main" or some other places, it's not needed to do a SET PROCEDURE TO conv53.prg if the other functions are only called by/within conv53.


That type of a call will only work if the procedure/function named the same as the prg file is the first function/procedure and there is no other code (other than comments) above the function/procedure line. It really is not good practice IMHO to have a prg contain a function/procedure by the same name.
Cy Welch
Senior Programmer/Analyst
MetSYS Inc
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform