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: Curly braces and the logic of PERL
    ... even though an equal number of left & right braces ... much Perl Golf;) The objective of Perl Golf is to write a program to ... # $string is a global containing the string to look for; ... # $REPORT is a global file handle to the output file; ...
    (perl.beginners)
  • Re: Parsing Strings in Enclosed in Curly Braces
    ... x = "{ABC EFG IJK LMN OPQ}" ... Can you have braces legitmately lying around in the string, ... Can you have nested braces, and what are you supposed to do with them: ... Parsing is not an entirely trivial subject, ...
    (comp.lang.python)
  • Re: Dynamic column specification in table update
    ... you need braces to EXEC a string. ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)