Sujet : Re: How do I correctly access this variable?
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tclDate : 04. Oct 2024, 10:01:35
Autres entêtes
Message-ID : <ygay134fdhs.fsf@akutech.de>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
* Colin Macleod <
user7@cmacleod.me.uk.invalid>
| Luc <
luc@sep.invalid> posted:
>
| > I am stumped by this:
| >
| > array set CONTROL {
| > InitialStartUpDir "$env(HOME)"
| > }
--<snip-snip>--
| > What am I doing wrong?
>
| Variable references do not get expanded inside braces {}.
| Try:
| array set CONTROL "
| InitialStartUpDir $env(HOME)
| "
Or safer, in case the expanded value contains spaces:
array set CONTROL [list InitialStartUpDir $env(HOME)]
HTH
R'