What: Assign using equals Where: From the contact Description: Tcl code to define new unknown command which allows one to use = as a simple assignment command. Contact: mailto:mtaylor@alias.com (Mike Taylor)
RS: This is one of the most frequent wishes for Tcl: to be able to write, in the Fortran/Algol/Pascal/C infix tradition,
i = $j + 1
as opposed to Tcl's Polish notation (command name always comes first):
A compromise would be to have a let command whose arguments have the required structure (e.g. Let's assign with let) - a most simple implementation could be this:
But of course directly using expr is still a tad more efficient...