Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program code in a memo file
Message
From
29/08/2000 11:36:29
 
 
To
29/08/2000 11:06:52
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00410133
Message ID:
00410303
Views:
22
>>>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.

Oops! You're right.
This is in a utility program that runs from within VFP anyway....
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform