Re: [TCLCORE] TIP #266: Numbers are Commands
by Peter MacDonald other posts by this author
Apr 13 2006 10:17AM messages near this date
Re: [TCLCORE] TIP #266: Numbers are Commands
|
Re: [TCLCORE] TIP #266: Numbers are Commands
On April 13, 2006 09:35 am, Brian Griffin wrote:
> > The first [set x] works, but not the second. Maybe this suggests that
> > the syntax should require braces
> >
> > set x [(.0+3)]
>
> Do you mean parentheses (()), or do you really mean braces ({})? I
> think requiring braces is a bad idea.
The former. The idea is that expr already groks () in expressions so if
it fails to resolve to a command it can be passed it to Tcl_ExprObj directly
by [unknown].
> I think in this case ".0" should *not* be recognized as a number. This
> is not an unreasonable restriction for expressions, IMO.
The same breakage can result from [proc 0 ...] etc.
A more real-world example of this tip in use is something like:
set x [$a+9]
Does placing restrictions on the value of $a make sense?
--
Peter MacDonald PDQ Interfaces Inc
Email: peter@[...].com http://pdqi.com
Phone: (250) 595-5998
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Kristoffer Lawson
Arjen Markus
Peter MacDonald
Kristoffer Lawson
Peter MacDonald
Kristoffer Lawson
Peter MacDonald
Kristoffer Lawson
Arjen Markus
dgp
Arjen Markus
Brian Griffin
Peter MacDonald
Kristoffer Lawson
Gustaf Neumann
Donal K. Fellows
Donald G Porter
Neil Madden
David N. Welton
Arjen Markus
Kristoffer Lawson
Neil Madden
Kristoffer Lawson
Lars Hellström
Neil Madden
Kristoffer Lawson
|