Re: Unbalanced braces in variable names
From: Derk Gwen (derkgwen_at_HotPOP.com)
Date: 10/14/03
- Next message: Bruce Hartweg: "Re: Problem with "tkwait variable""
- Previous message: Bob Techentin: "Re: Memory problem"
- In reply to: Torsten Reincke: "Unbalanced braces in variable names"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 14 Oct 2003 14:27:10 -0000
# % set string(1 "a string"
# % string length $string(1
#
# Giving this command in tclsh will not work, the command will not
# finish. But
#
# % string length ${string(1}
set knows its second argument is the variable name, and so it figures out some
way to parse it. $ knows that a variable name can follow, and tries to find the
longest prefix that is valid variable. ${...} again knows the entire extent
of the variable name and figures out a way to parse it.
-- Derk Gwen http://derkgwen.250free.com/html/index.html The whole world's against us.
- Next message: Bruce Hartweg: "Re: Problem with "tkwait variable""
- Previous message: Bob Techentin: "Re: Memory problem"
- In reply to: Torsten Reincke: "Unbalanced braces in variable names"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|