>I was thinking it would be fairly cool to keep code for some methods in a memo field in a table. Then I could change/debug without re-compiling everything.
>
>Has anyone done this before? Can it be done? How would I execute the code once it was in the field (eval())?
>
>Thanks.
You can't EVAL() more than a single expression. And you can't macro substitute more than a single command. Before SP3, the way to run a block of code from a memo or built dynamically was with Randy Pearson's masterful CodeBlock program. It tooks a block of code, and macro substituted it line by line, even with intelligent branching, loops and cases.
But with VFP SP3, we have COMPILE at runtime. You can pull a block of code from a memo field, write it to a file, COMPILE the file, and DO the program:
=STRTOFILE(MyTable.MyMemo, "Somefile.prg")
COMPILE Somefile.prg
DO SomeFile
Erik Moore
Clientelligence