Unix and Linux Discussions Tagged with repeating |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
8 |
11,280 |
Shell Programming and Scripting |
|
|
|
7 |
4,488 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,562 |
Shell Programming and Scripting |
|
|
|
3 |
2,397 |
Shell Programming and Scripting |
|
|
|
0 |
1,434 |
OS X Support RSS |
|
|
|
7 |
16,038 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,451 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
4,658 |
Programming |
|
|
|
4 |
5,748 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
5,384 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,412 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
6,145 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,711 |
UNIX for Dummies Questions & Answers |
lrepeat(3tcl) Tcl Built-In Commands lrepeat(3tcl)
__________________________________________________________________________________________________________________________________________________
NAME
lrepeat - Build a list by repeating elements
SYNOPSIS
lrepeat number element1 ?element2 element3 ...?
_________________________________________________________________
DESCRIPTION
The lrepeat command creates a list of size number * number of elements by repeating number times the sequence of elements element1 element2
.... number must be a positive integer, elementn can be any Tcl value. Note that lrepeat 1 arg ... is identical to list arg ..., though
the arg is required with lrepeat.
EXAMPLES
lrepeat 3 a
-> a a a
lrepeat 3 [lrepeat 3 0]
-> {0 0 0} {0 0 0} {0 0 0}
lrepeat 3 a b c
-> a b c a b c a b c
lrepeat 3 [lrepeat 2 a] b c
-> {a a} b c {a a} b c {a a} b c
SEE ALSO
list(3tcl), lappend(3tcl), linsert(3tcl), llength(3tcl), lset(3tcl)
KEYWORDS
element, index, list
Tcl 8.5 lrepeat(3tcl)