Re: Array get element with default (no error if not exist)

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Array get element with default (no error if not exist)
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tcl
Date : 16. Aug 2024, 15:54:01
Autres entêtes
Message-ID : <ygajzggzfg6.fsf@akutech.de>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
* Emiliano <emil.g@example.invalid>
| On Fri, 16 Aug 2024 07:10:30 +0000
| RodionGork <rodiongork@github.com> wrote:
| > Also why [array exists ...] command does not exist (while [dict exists
| > ..] does)? Perhaps there is something about no good syntax for it due
| > to how arrays are implemented?
>
| The [array exists] command is there since ... forever
>
| % array exists foo
| 1
| % array exists nosucharray
| 0

Obviouosly in this context the OP meant "array exists" with respect to a
specific key, i.e.

  array exists arrayname key
  => return true if arrayname is an array and the key exists in that array.

R'

Date Sujet#  Auteur
16 Aug 24 * Array get element with default (no error if not exist)8RodionGork
16 Aug 24 +* Re: Array get element with default (no error if not exist)5Ralf Fassel
17 Aug 24 i`* Re: Array get element with default (no error if not exist)4RodionGork
17 Aug 24 i `* Re: Array get element with default (no error if not exist)3Rich
18 Aug 24 i  `* Re: Array get element with default (no error if not exist)2RodionGork
18 Aug 24 i   `- Re: Array get element with default (no error if not exist)1Rich
16 Aug 24 `* Re: Array get element with default (no error if not exist)2Emiliano
16 Aug 24  `- Re: Array get element with default (no error if not exist)1Ralf Fassel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal