Menu

#636 (Dummy) arguments of a proc with same name

open
5
2012-05-26
2012-05-26
No

"proc a {a a} {puts $a} ; a 1 2" writes "1" to stdout. Generally, args with identical names are placeholders, but this result is weird. E.g. "foreach {a a} {1 2} {puts $a}" writes "2" to stdout, so, I would see "2" by the proc "a" too.
Anyway, the documentation should contain the correct behavior, I think.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.