0

I want to look at the actual code behind many of the commands in Tcl,
https://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm

Is this possible? For example, if I wanted to look at the "foreach" command to see how it works in Tcl code, can I find that in my Tcl file downloaded from ActiveState?

MetaStack
  • 3,266
  • 4
  • 30
  • 67
  • get the tcl source and start reading? tcl's not likely to be a "self-hosting" language. – Marc B Nov 30 '15 at 21:10
  • 1
    Many Tcl commands implemented in bytecode as well as having an interpretation fallback, which means their implementation is arguably in at least three places (interpreted version, command compiler, bytecode engine core). The `foreach` command is one of these. – Donal Fellows Dec 01 '15 at 06:15

1 Answers1

2

The Tcl/Tk source can be downloaded here: Tcl/Tk Software Download

Brad Lanam
  • 5,192
  • 2
  • 19
  • 29