Re: ?? exec prog << value ??
- From: Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 May 2007 20:13:49 GMT
Zeh Mau wrote:
Ok, I have a file called example.tcl
the file contains the following commands:
-----------------------------------------
set var 4+4\n
puts $var
set result [exec test_prog << $var]
puts $result
-----------------------------------------
The output is:
-----------------------------------------
4+4
syntax error
can't read "result": no such variable
-----------------------------------------
The message "syntax error" is created by
test_prog when there is no mathematical expression.
Thanks for your help,
Zeh Mau
Ok, your tcl code is correct. Your test_prog must have a bug.
Can you run your test_prog from the command line, like the following?
echo '4.4' | test_prog
My guess is, if you run it from the command line you will get the same error.
--
Bryan Oakley
http://www.tclscripting.com
.
- References:
- ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- From: Bryan Oakley
- Re: ?? exec prog << value ??
- From: Cameron Laird
- Re: ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- From: Bryan Oakley
- Re: ?? exec prog << value ??
- From: Zeh Mau
- ?? exec prog << value ??
- Prev by Date: Re: Integer arithmetic problem
- 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
|