Re: Variable ontology (was: Q: Pointers in TCl) _________________________________________________________________ From tom@neosoft.com (Tom Silva) Organization NeoSoft, Inc. Date 2 Apr 1998 18:58:03 GMT Newsgroups comp.lang.tcl Message-ID <6g0n3r$guv$1@uuneo.neosoft.com> References 1 2 3 4 _________________________________________________________________ Cameron Laird (claird@Starbase.NeoSoft.COM) wrote: > 2. Who uses subst? ... > > ... compelling instance of subst-ing. The two domains > that seem likely to me are some kind of CGI template > expansion, and processing of a configuration-speci- > fication-that-is-written-as-an-executable-script. I've only used subst with spec-as-script, and even then I -could- get by with quotes and lots of escaped characters ... or redesign. The subst just makes for easier reading next time I'm forced to look at the code. .m1 add command -label on -command "yadda_on $name 1" .m1 add command -label off -command "yadda_on $name 0" .m1 add command -label delete -command [subst -nocommands \ {if {[my_msg $x $y "Delete yadda yadda $name?"] == "ok"} \ {yadda_del $name}}] Yes, I could redesign and write yadda_del with the query inside it, then just use -command "yadda_del $name". Compelling instance? No.