1lrepeat(n)                   Tcl Built-In Commands                  lrepeat(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       lrepeat - Build a list by repeating elements
9

SYNOPSIS

11       lrepeat number element1 ?element2 element3 ...?
12_________________________________________________________________
13

DESCRIPTION

15       The  lrepeat command creates a list of size number * number of elements
16       by repeating number times the sequence of  elements  element1  element2
17       ....  number must be a positive integer, elementn can be any Tcl value.
18       Note that lrepeat 1 arg ...  is identical to list arg ...,  though  the
19       arg is required with lrepeat.
20

EXAMPLES

22              lrepeat 3 a
23                     a a a
24              lrepeat 3 [lrepeat 3 0]
25                     {0 0 0} {0 0 0} {0 0 0}
26              lrepeat 3 a b c
27                     a b c a b c a b c
28              lrepeat 3 [lrepeat 2 a] b c
29                     {a a} b c {a a} b c {a a} b c
30

SEE ALSO

32       list(n), lappend(n), linsert(n), llength(n), lset(n)
33
34

KEYWORDS

36       element, index, list
37
38
39
40Tcl                                   8.5                           lrepeat(n)
Impressum