Re: Syntax, expressiveness and the beauty of Tcl
- From: "slebetman@xxxxxxxxx" <slebetman@xxxxxxxxx>
- Date: 30 Oct 2006 18:16:26 -0800
Stephan Kuhagen wrote:
One point on the wiki-page was the syntax for math expressions like
x=a+b
in a "normal" language (whatever this means) which is
set x [expr $a+$b]
My personal favourite is to do [interp alias {} expr {} =] so I can
write:
set x [ = $a + $b ]
which in a way looks a little normal again albeit with added [] noise.
Of course for maximum speed I'd have to write:
set x [= { $a + $b }]
with a lot more noise: [{}]. But it's good enough for me. And it's
compact enough for direct calculations in Tk:
label .l -width [= 150+$a] -height [= $a+$b]
and it also reads quite nice (width "equals" 150 "plus" $a).
.
- Follow-Ups:
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Fredderic
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- References:
- Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Syntax, expressiveness and the beauty of Tcl
- Prev by Date: problem installing aolserver 4.5.0 on redhat ENT 3 linux from source
- Next by Date: Re: problem installing aolserver 4.5.0 on redhat ENT 3 linux from source
- Previous by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Next by thread: Re: Syntax, expressiveness and the beauty of Tcl
- Index(es):
Relevant Pages
|