| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 6 | |
hello everybody.. is there anything equivalent Qt for the Tcl eval expr command ? i.e. for evaluating expressions.. cheers Sathya
On Mon, 15 Mar 2004, Sathya Krishnamurthy wrote: > is there anything equivalent Qt for the Tcl eval expr command ? i.e. for > evaluating expressions.. No. But this is not a Qt specific limitation. It's a general limitation of C++ as a compiled language. So either you write a function compiling a code snippet on the fly, find a C++ interpreter or use one of the script bindings like QSA. Harri.
Quoting Harri Porten <porten@froglogic.com>: > On Mon, 15 Mar 2004, Sathya Krishnamurthy wrote: > > > is there anything equivalent Qt for the Tcl eval expr command ? i.e. for > > evaluating expressions.. > > No. But this is not a Qt specific limitation. It's a general limitation of > C++ as a compiled language. So either you write a function compiling a > code snippet on the fly, find a C++ interpreter or use one of the script > bindings like QSA. Or indeed you write your own expression parser, either by hand or using a lexer or lexer and parser like [f]lex and yacc/bison. A+ Paul