[Gambas-user] Executing a constructed instruction
Fabien Bodard
abidoo.too at ...11...
Mon Jun 14 21:50:21 CEST 2004
Le lundi 14 Juin 2004 22:34, Charlie a écrit :
> Nigel Gerrard schrieb:
> >Thanks Charlie for your reply.
> >
> >Unfortunately gb.eval only works in evaluating an expression.
> >
> >Here I was thinking about something that will execute the line (command)
> > in gambas,
> >thus enabling me to create the relevant code on the run.
> >
> >Nigel
>
> Salut Nigel,
>
> that is what I thought, so I rememebered the old Clipper.
>
> I think he took while compiled not only his lib, but also all functions
> and subs from the project.
>
> So you coulde do (don't be to strong with me for the Syntax, I haven't
> wrote code in Clipper the last 6 years ) :
>
> coText := "makeIt(5,6)"
>
> iRet := &coText // & is the Macro signe that is executing the Text
> in coText
> // iRet would become 30
>
> Function makeIt(n1,n2)
> return n1 * n2
>
> I would like this also, because that would make gambas very flexible.
>
> Amicalement
> Charlie
>
it can be usefull for lot of thing like report... macrofiles...
it look at the forth system...
Amicalement
Fabien
More information about the User
mailing list