Re: ?? exec prog << value ??
- From: claird@xxxxxxxxx (Cameron Laird)
- Date: Thu, 31 May 2007 18:49:31 +0000
In article <DDD7i.6794$C96.2729@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx> wrote:
Zeh Mau wrote:.
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.
Show us the complete and actual error message, as well as the exact line
of code. Otherwise we can only guess.
In addition, also tell us what happens when you do "echo '2+2' | prog"
from the command line.
.
.
Possible variations that occur to me:
exec prog << $var
exec prog << $var\n
I can easily imagine, though, that
exec prog << var
tosses an exception.
.
- Follow-Ups:
- Re: ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- References:
- ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- From: Bryan Oakley
- ?? exec prog << value ??
- Prev by Date: Re: ?? exec prog << value ??
- Next by Date: Re: ?? exec prog << value ??
- Previous by thread: Re: ?? exec prog << value ??
- Next by thread: Re: ?? exec prog << value ??
- Index(es):
Relevant Pages
|