Re: How do I correctly access this variable?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: How do I correctly access this variable?
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tcl
Date : 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'

Date Sujet#  Auteur
4 Oct 24 * How do I correctly access this variable?4Luc
4 Oct 24 `* Re: How do I correctly access this variable?3Colin Macleod
4 Oct 24  `* Re: How do I correctly access this variable?2Ralf Fassel
4 Oct 24   `- Re: How do I correctly access this variable?1et99

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal