TCL conditional commands using ternary operator
<p>is it possible to run conditional commands using TCL's ternary operator?</p>

<p>using if statement</p>

<pre><code>   if {[string index $cVals $index]} {
       incr As
    } {
       incr Bs
    }
</code></pre>

<p>I would like to use ternary operator as follows but I get an error</p>

<blockquote>
  <p>invalid command name "1" while executing "[string index $cVals $index]
  ? incr As : incr Bs"</p>
</blockquote>

<pre><code>[string index $cVals $index] ? incr As : incr Bs
</code></pre>