Question:code
下面的Tcl程序会报如上错:io
set a 5 if{ $a<10 }{ puts $a }
Solution:class
if、for、foreach等条件语句中大括号{、}最好左右都留空格。以下不会报错:foreach
if
for
foreach
{
}
set a 5 if { $a<10 } { puts $a }