Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing source code from a memo field.
Message
De
21/08/2002 15:02:07
 
 
À
21/08/2002 09:44:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00687079
Message ID:
00692143
Vues:
22
He was using only VFP version 5, so no EXECSCRIPT() function for him. Also no compiling on the fly (version 6 ). I was trying to work something out that might do the trick. :)

>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
Jim Newsom
IT Director, ICG Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform