the if statement in TCL

前端 未结 4 782
忘掉有多难
忘掉有多难 2021-02-04 06:26

I have a question about if statement in tcl of the following code:

if {(($number == 1)&&($name == \"hello\")) || (($number == 0)&&($name == \"yes         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-04 06:42

    In ($number == 1) number is assigned 1 and the comparison is made.Ex: 1==1 here output is Boolean. But in {$number == 1 && $name == "hello"} $number is not assigned because of flower bracket $number is compared with 1 so output obtained is not Boolean.

提交回复
热议问题