Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing source code from a memo field.
Message
From
21/08/2002 09:44:17
 
 
To
20/08/2002 18:15:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00687079
Message ID:
00691909
Views:
19
I thought that was what the new ExecScript() function was for.

From the help file.

ExecScript Enables you to run multiple lines of code from variables, tables, and other text at runtime.

ExecScript(cExpression [, eParameter1, eParameter2, ...])
Parameters
cExpression
Represents the text, a variable, type string, or memo to be executed as code.
eParameter1, eParameter2, …
Optional. Specify parameters passed to a script that has a parameter statement in first line.
Return Values
The return value is the value returned by the script in cExpression. If the script returns no value, Visual FoxPro returns .T.

Remarks
ExecScript( ), unlike macro expansion, provides the same effect as selecting several lines of code in the command window then pressing the Enter key.




>>>Hi.
>>>Is it possible to execute a program wich source code is in a memo field of a table??? How??
>>>
>>>TIA
>>
>>This is a bit messy but you might try STRTOFILE() to send the memo contents to 'xyz.prg' and then just DO xyz.prg
>
>actually COPY MEMO will work to send memo contents to a file, just assign a prg extension to it
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform