Re: string_exec()

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcuny said...
katsmeow said...

Tiggr, what is 5 + 4?

It's pretty easy to write a string_exec() routine that does this:

string_exec("5+4") 

Since Euphoria can see it's own variables and values (trace does this), it should be straight forward to do this as well:

string_exec("5+4-myVariable") 

Well, except the programmer cannot see the var table. If you ask for the value of myVariable, it's more likely to crash because the var doesn't exist.

dcuny said...

And since Euphoria can see user defined functions, it's not hard to extend string_exec to be able to this as well:

string_exec("5+4-myRoutine(myVariable)") 

You can of course put anything in the string, that doesn't mean it gets converted to IL code and executes in the scope of where it was called.

dcuny said...

Is this what you're asking for? If so, it's a lot simpler than the solutions that have been proposed.

- David

Show us. I'll pause taking Tiggr apart for a lil while, to see what you come up with.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu