Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Program code in a memo file
Message
De
29/08/2000 11:06:52
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
 
 
À
29/08/2000 10:23:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00410133
Message ID:
00410283
Vues:
15
>>Greetings All,
>>
>>I had a student recently ask me if you can store code in a memo field so it can be accessed, compiled, and executed at runtime. I think this is possible with the COMPILE command, yes? I just haven't had a chance to research it yet...
>>
>>So, is it fairly striaght forward? Any traps I should tell him to watch out for?
>>
>>Thanks!
>
>Yep. Do it all the time - without the COMPILE command
>
>** e.g.,code in field mcode
>lcFile = FORCEEXT(FORCEPATH(SYS(2015),SYS(2023)),"PRG")
>COPY MEMO mcode TO (lcFile)
>* make sure it got out there...
>IF FILE(lcFile)
>DO (lcFile)
>ENDIF
>** clean up
>ERASE (FORCEEXT(lcFile,"*"))



Trey,
You can only do it without the COMPILE command if you're running FoxPro. An exe will tell you it cannot find the program refered to in lcFile unless you COMPILE (lcFile) first.
David.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform