Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing Code within Memo fields in an EXE
Message
From
29/06/1998 13:55:01
Bob Lucas
The WordWare Agency
Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00112479
Message ID:
00112587
Views:
18
>I know someone out there has had to come across this same problem. Can anyone shed some light?
>
>I have an app (exe) which uses a data dictionary concept. I store multi-line logic identical to a prg in MEMO field. In my case the code will execute agains some data for formatting it and well as any post processing purposes.
>
>In my approach, I simply read the memo field contents, write them out to a temporary prg and perform a DO (tempprg). This works great as long as the application in not an EXE.
>
>Do anyone have another approach or fix to my problem.
>
>P.S. Remember, this is beyong your typical 1 line EVALUATE() solution.

If the code in your data dictionary is not created at runtime but is supplied by you then add another memo field called fxp_data and compile the code in the memo field into an fxp and save it in the fxp_data memo field. A simple routine to create the fxp_data memo is

SCAN
copy prg_data to temp.prg
compile temp.prg
append memo fxp_data from temp.fxp overwrite
ENDSCAN

when you want to run the fxp in the memo field I do this

m.prog = 'temp.fxp'
copy fxp_data to temp.fxp
DO (m.prog)

I set prog as a variable so the project manager won't look for temp.fxp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform