summaryrefslogtreecommitdiffhomepage
path: root/tcl.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'tcl.html.markdown')
-rw-r--r--[-rwxr-xr-x]tcl.html.markdown9
1 files changed, 5 insertions, 4 deletions
diff --git a/tcl.html.markdown b/tcl.html.markdown
index f2d92fcd..c1cd42ca 100755..100644
--- a/tcl.html.markdown
+++ b/tcl.html.markdown
@@ -121,7 +121,8 @@ puts lots\nof\n\n\n\n\n\nnewlines
# A word enclosed in braces is not subject to any special interpretation or
-# substitutions, except that a backslash before a brace is not counted when look#ing for the closing brace
+# substitutions, except that a backslash before a brace is not counted when
+# looking for the closing brace
set somevar {
This is a literal $ sign, and this \} escaped
brace remains uninterpreted
@@ -169,7 +170,7 @@ namespace eval people {
#The full name of a variable includes its enclosing namespace(s), delimited by two colons:
-set greeting "Hello $people::person::name"
+set greeting "Hello $people::person1::name"
@@ -189,7 +190,7 @@ set greeting "Hello $people::person::name"
namespace delete ::
-# Because of name resolution behaviour, its safer to use the "variable" command to declare or to assign a value to a namespace.
+# Because of name resolution behaviour, it's safer to use the "variable" command to declare or to assign a value to a namespace.
namespace eval people {
namespace eval person1 {
variable name Neo
@@ -256,7 +257,7 @@ proc greet greeting\ name return\ \"Hello,\ \$name!
proc fold {cmd args} {
set res 0
foreach arg $args {
- set res [cmd $res $arg]
+ set res [$cmd $res $arg]
}
}
fold ::tcl::mathop::* 5 3 3 ;# -> 45