Thread: TCL/Tk help please

  1. #1
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732

    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

  2. #2
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    Never mind I sorted. But any comments is much appreciated.

    ssharish

Popular pages Recent additions subscribe to a feed