Re: Syntax, expressiveness and the beauty of Tcl



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
.



Relevant Pages

  • Re: Luthier question: Intonating via thinning braces
    ... Is it possible, in your experience, to alter the intonation of one ... string by thinning the braces, whether one brace or more than one. ... Do you recall if your tweaked guitar had a change in intonation? ...
    (rec.music.classical.guitar)
  • Re: empty list
    ... Dan Smart wrote: ... string, and that strings can be converted to lists, and as previously ... stated I'd be very happy if braces actually constructed lists. ...
    (comp.lang.tcl)
  • Re: Dynamic column specification in table update
    ... you need braces to EXEC a string. ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: how to identify string between flower braces
    ... I would to retrieve what is present inside the flower braces after ... If you know your data is not a list you must use string commands. ... Specifically, a matched set of braces, some whitespace, another matched set of braces, some whitespace, then whatever is in the third matched set of braces. ...
    (comp.lang.tcl)
  • Re: Luthier question: Intonating via thinning braces
    ... string by thinning the braces, whether one brace or more than one. ... thin down the bracing on one of my guitars, I later got a call from ...
    (rec.music.classical.guitar)