Re: Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen <nospam@xxxxxxxxxx>
- Date: Mon, 30 Oct 2006 10:44:24 +0100
I though assignment is optional, so:
set result [: 2+2]
would be a more interesting example.
It works this way also, but my point was to be able to write
: x=2+2
However, expressions specified
this way will be early evaluated by the Tcl parser. The speed advantage
of braced expressions (if they contain substitutions) gets lost. One
would better write
: x = {$y+$z}
This does not work with my example, the result then is the string inside the
braces. But I did not intend to give a full blown implementation. I just
played around a little.
Regards
Stephan
.
- Follow-Ups:
- Re: Syntax, expressiveness and the beauty of Tcl
- From: Donal K. Fellows
- Re: Syntax, expressiveness and the beauty of Tcl
- References:
- Syntax, expressiveness and the beauty of Tcl
- From: Stephan Kuhagen
- Re: Syntax, expressiveness and the beauty of Tcl
- From: suchenwi
- Syntax, expressiveness and the beauty of Tcl
- Prev by Date: Re: examine or describe a proc?
- Next by Date: strings in TcL
- 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
|
|