Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip: Run-time compiling and undefined PRG's
Message
 
À
12/08/1999 09:22:15
Kenneth Downs
Secure Data Software, Inc.
New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00252923
Message ID:
00253034
Vues:
22
>If you use run-time compiling, you can run into a problem with undefined procedures. The answer is to refer to your procedures with name substitution.
>
>Consider the situation where your program builds a file on the fly and compiles it. The file is named MyProg.PRG.
>
>If you have a reference to MyProg() in code, the project will compile with an error complaining that MyProg does not exist. If you put in EXTERNAL PROC Myprog, the project then compiles with an error complaining that MyProg is undefined.
>
>The answer is to not explicitly reference MyProg, but to assign it to a variable and refer to it that way, as in:
>
>
>MyProcName = "MyProg()"
>=EVAL(MyProcName)
>
>
>This cures the compile-time blues.

You can do the following as well (used to run into this in DOS when creating an exe)...

do ('myprog')


Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform