prashhiit
Programmer
- Sep 6, 2011
- 3
set x 1
if {$x == 1} {
puts "x=1"
} else {
jsfdlkdsjfh
}
Hello All,
In the above code, there is a Syntax error in the 'else' part. If I run this in tclsh, I don't get any error. Unlike c/C++, tclsh does not give all syntax errors in the script. Since, x=1 if condition is always satisfied so it never enters into else part.
My Question is "How can I get syntax error in the 'else' part. What should I do to get all Syntax errors in my Tcl Script."
Please suggest me
Thanks
Prashanth
if {$x == 1} {
puts "x=1"
} else {
jsfdlkdsjfh
}
Hello All,
In the above code, there is a Syntax error in the 'else' part. If I run this in tclsh, I don't get any error. Unlike c/C++, tclsh does not give all syntax errors in the script. Since, x=1 if condition is always satisfied so it never enters into else part.
My Question is "How can I get syntax error in the 'else' part. What should I do to get all Syntax errors in my Tcl Script."
Please suggest me
Thanks
Prashanth