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 count ?element ...?
12______________________________________________________________________________
13

DESCRIPTION

15       The  lrepeat  command creates a list of size count * number of elements
16       by repeating count times the sequence of elements element  ....   count
17       must  be  a  non-negative  integer, element can be any Tcl value.  Note
18       that lrepeat 1 element ...  is identical to list element ....
19

EXAMPLES

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

SEE ALSO

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

KEYWORDS

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