Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expr without braces

13 views
Skip to first unread message

tclt...@aol.com

unread,
Jun 7, 2007, 9:36:59 AM6/7/07
to
Using Nagelfar -Tcl Syntax Checker1.1.7 this expression:

set total_cost [format "%.2f" [expr $solid_cost + $pur_cost +
$td_cost + $proc_cost]]

got this warning:
"Expr without braces"

Where do I put the braces?

Mark Janssen

unread,
Jun 7, 2007, 9:51:56 AM6/7/07
to

Like this:


set total_cost [format "%.2f" [expr {$solid_cost + $pur_cost +
$td_cost + $proc_cost}]]

Also read http://wiki.tcl.tk/10225 for the reason Nagelfar is
complaining about this.

Mark

Uwe Klein

unread,
Jun 7, 2007, 9:54:03 AM6/7/07
to

see:
http://wiki.tcl.tk/10225
for the why.

uwe

tclt...@aol.com

unread,
Jun 7, 2007, 7:38:01 PM6/7/07
to
On Jun 7, 9:54 pm, Uwe Klein <uwe_klein_habertw...@t-online.de> wrote:

thanks.

0 new messages