-
TCL/Tk help please
Hi guys, I need help on mytcl/tk code which produces this error code. This is my tcl code.
Code:
#!/usr/bin/tclsh
[catch [exec gcc -Wall -W sample.c] err]
When I run this code, I get this error
Code:
sample.c: In function ‘main’:
sample.c:7: error: expected ‘;’ before ‘getchar’
sample.c:9: error: expected ‘;’ before ‘}’ token
while executing
"exec gcc -Wall -W sample.c"
invoked from within
"catch [exec gcc -Wall -W sample.c] err"
invoked from within
"[catch [exec gcc -Wall -W sample.c] err]"
(file "date.tcl" line 2)
The gcc runs fine but when it find an error in sample .c. IT produces the error message and leaves with error code. When this error code gets back to the exec i think it is termination unexpectedly as well. I have got this sample.c code with the semicolon missing on purpose so that i can work around with this problem. But it looks like it driving me a lot. How do i get ride of that error message from tcl interpretor.
Can any on please know why does not error message appreas is there any way i can get ride of that.
Thanks a lot
ssharish
-
Never mind I sorted. But any comments is much appreciated.
ssharish