Artifact ec7ec4001ff49e935b55edbe98d1daeda11f0e2321aaa00974f9404df6713f18:
- File doc/markdown/list.md — part of check-in [dad17a1a39] at 2025-06-13 14:46:34 on branch tip-700 — - added 22 more initial markdown pages - unified syntax in zipfs.n, removing the unusual "?(\fB\-glob\fR|\fB\-regexp\fR)?" to specify alternatives - unified syntax in my.n, idna.n, msgcat.n, fpclassify.n, class.n, object.n, mathfunc.n - expanded parsing of \fB-\fI patterns and added testcase (user: Torsten, size: 1487) [annotate] [blame] [check-ins using] [more...]
CommandName: list ManualSection: n Version: unknown TclPart: Tcl TclDescription: Tcl Built-In Commands Links:
- lappend(n)
- lassign(n)
- ledit(n)
- lindex(n)
- linsert(n)
- llength(n)
- lmap(n)
- lpop(n)
- lrange(n)
- lremove(n)
- lrepeat(n)
- lreplace(n)
- lreverse(n)
- lsearch(n)
- lseq(n)
- lset(n)
- lsort(n) Keywords:
- element
- list
- quoting Copyright:
- Copyright (c) 1993 The Regents of the University of California.
- Copyright (c) 1994-1996 Sun Microsystems, Inc.
- Copyright (c) 2001 Kevin B. Kenny [email protected]. All rights reserved. ---
Name
list - Create a list
Synopsis
::: {.synopsis} ::: [list]{.cmd} [arg arg]{.optdot} :::
Description
This command returns a list comprised of all the args, or an empty string if no args are specified. Braces and backslashes get added as necessary, so that the lindex command may be used on the result to re-extract the original arguments, and also so that eval may be used to execute the resulting list, with arg1 comprising the command's name and the other args comprising its arguments. List produces slightly different results than concat: concat removes one level of grouping before forming the list, while list works directly from the original arguments.
Example
The command
list a b "c d e " " f {g h}"
will return
a b {c d e } { f {g h}}
while concat with the same arguments will return
a b c d e f {g h}