Mallikarjunarao Kosuri <
mall...@gmail.com> wrote:
> On Sunday, May 20, 2012 12:43:13 PM UTC+5:30, Mallikarjunarao Kosuri wrote:
>> I want convert a character into integer how we can did this in TCL?
> Thanks i got it
> % format %c [expr [scan c %c]+1]
> d
Better curly-brace the expression:
format %c [expr {[scan c %c]+1}]
It's generally a good rule of thumb to *always* brace the expression.
(The only exceptions are, where substituted values become part of
the expression, rather than just operands.)
In this case, adding the curlies will just give you improved
performance. In many other cases, using braced expressions will
avoid bugs, too.