?? exec prog << value ??



Hello comp.lang.tcl !!!

I have the following problem:

I have created a program with with flex and bison (lex, yacc),
a small calculator,
now i want to execute the program within a tcl-script.

Therefore I write

exec prog << var
where var shall be the mathematical expression, e.g. 2+2

Now I thought,
the prog will be executed and by using
<<
the value of var (string) 2+2 will be passed as input to prog.

Unfortunately, there is only
the message "syntax error" instead of - as i have expected - 4.

Is anybody able to give me a hint?

Thanks,
Zeh Mau

.



Relevant Pages

  • Re: ?? exec prog << value ??
    ... a small calculator, ... now i want to execute the program within a tcl-script. ... where var shall be the mathematical expression, ... the prog will be executed and by using ...
    (comp.lang.tcl)
  • Re: ?? exec prog << value ??
    ... a small calculator, ... now i want to execute the program within a tcl-script. ... the value of var 2+2 will be passed as input to prog. ...
    (comp.lang.tcl)
  • Re: ?? exec prog << value ??
    ... now i want to execute the program within a tcl-script. ... where var shall be the mathematical expression, ... the value of var 2+2 will be passed as input to prog. ...
    (comp.lang.tcl)
  • Re: ?? exec prog << value ??
    ... a small calculator, ... now i want to execute the program within a tcl-script. ... the value of var 2+2 will be passed as input to prog. ...
    (comp.lang.tcl)
  • Re: ?? exec prog << value ??
    ... a small calculator, ... now i want to execute the program within a tcl-script. ... where var shall be the mathematical expression, ... exec prog << $var ...
    (comp.lang.tcl)