Difference between revisions of "Documentation/How Tos/Calc: REPT function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Difference between REPT and CONCATENATE) |
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
||
Line 16: | Line 16: | ||
:: returns <tt>'''xyz'''</tt> where <tt>'''x'''</tt>, <tt>'''y'''</tt>, <tt>'''z'''</tt> are three randomly independent digits. | :: returns <tt>'''xyz'''</tt> where <tt>'''x'''</tt>, <tt>'''y'''</tt>, <tt>'''z'''</tt> are three randomly independent digits. | ||
− | + | {{Documentation/SeeAlso| | |
− | + | * [[Documentation/How_Tos/Calc: CONCATENATE function|CONCATENATE]]''' | |
− | + | * [[Documentation/How_Tos/Calc: Text functions|Text functions]]''' | |
− | [[Documentation/How_Tos/Calc: Functions listed alphabetically| | + | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] |
− | [[Documentation/How_Tos/Calc: Functions listed by category| | + | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} |
Revision as of 14:15, 25 February 2009
REPT
returns a text string comprised of copies of another text string.
Syntax:
REPT(text; number)
- returns number copies of text, joined together.
Example:
- REPT("ha"; 3)
- returns hahaha.
- REPT(ROUND(RAND()*10); 3)
- returns nnn where n is a random digit repeated three times, while:
- CONCATENATE(ROUND(RAND()*10); ROUND(RAND()*10); ROUND(RAND()*10))
- returns xyz where x, y, z are three randomly independent digits.
- returns nnn where n is a random digit repeated three times, while: