home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
- From: karl@NeoSoft.com (Karl Lehenbauer)
- Newsgroups: comp.lang.tcl
- Subject: Re: evalling a string
- Message-ID: <BxwHoo.M8I@NeoSoft.com>
- Date: 18 Nov 92 07:19:31 GMT
- Article-I.D.: NeoSoft.BxwHoo.M8I
- References: <1992Nov18.002150.1089@twg.com>
- Organization: NeoSoft Communications Services -- (713) 684-5900
- Lines: 26
-
- In article <1992Nov18.002150.1089@twg.com> "David Herron" <david@twg.com> writes:
- >In article <9211171516.AA26302@valiant.src.honeywell.com>,
- >jkimball@src.honeywell.com (John Kimball) writes:
- >>I can't simply eval the string, because eval wants stuff-stuff to be a
- >>command name.
-
- >Instead of hacking on `unknown' like Gerald suggested ... it
- >would be easy enough to write a new C function which did the variable
- >references but otherwise left the string alone. I can't think of a
- >good name, so call it Tcl_ExpandThoseVariableReferences() for now.
-
- A command, "expand", originally appeared in Extended Tcl 4.0, which
- expanded square-bracketed items and variables, but returned the
- result without executing the first element as a command on the
- rest of the string as arguments -- just what you're asking for.
-
- It fell by the wayside because I couldn't convince John to keep it
- when he absorbed arrays, which involved changes in Tcl_Eval anyway.
-
- Nothing is lost, however, because you can always do
-
- eval "concat $listIWantToExpand"
-
- --
- -- Email info@NeoSoft.com for info on getting interactive Internet access.
- "Turn on your hot tub by email now. Ask me how."
-