Information générale
Catégorie:
Codage, syntaxe et commandes
>Hi to all,
>
>I've to put some line of code in a memo field a execute this code in my form's method.
>I've tried with macro substitution but if I've two or more lines of code I've a "Syntax error". Why ?
>
>I can't read line by line the memo because I can have a IF ELSE ENDIF statement, someone say me to copy this memo in a TEMP.PRG and DO TEMP.PRG but this is slow and my form have to do this operation several time in Init() or on a event.
>
>How can I execute my code in the memo ?
>
>Thanks in advance for any suggestion
you have to read the memo line by line - and you have to write somesort of interperter so you can handle
loops, IFs etc.
I believe I heard someone made such an interperter in the past and it may be available somewhere on the web
usually - you can't copy into a prg because you will not be able to compile it in an EXE
if you ask me - the whole idea of resolving complete programs at run-time is not a very good one
Arnon
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement