Difference between revisions of "Manuals/calci/REPT"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''REPT'''</font></font></font><font color="#484848...") |
|||
Line 1: | Line 1: | ||
− | + | =REPT(txt, numt)= | |
− | < | + | *where <math>txt</math> is a text that is to be repeated |
+ | *<math>numt</math> is a positive number that specifies how many number of times to repeat the text. | ||
− | + | REPT() repeats a text for specified number of times. | |
− | |||
− | |||
− | + | == Description == | |
− | + | REPT(txt, numt) | |
− | |||
− | |||
− | + | For Example, | |
− | + | REPT("*",5) returns ''*****'' | |
− | |||
− | |||
− | < | + | *<math>txt</math> should be enclosed in quotes. |
+ | *<math>numt</math> should be a positive number, else Calci ignores it and returns an empty text (""). | ||
+ | *If <math>numt</math> is equal to zero, Calci returns an empty text (""). | ||
+ | *If <math>numt</math> is a non-integer, Calci rounds it and displays the output. | ||
− | + | == Example == | |
− | + | <div id="6SpaceContent" class="zcontent" align="left"> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <div id=" | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | | class=" " | | + | | class=" " | '''Function''' |
− | + | | class=" " | '''Output''' | |
− | | class=" " | | + | |
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" |REPT("ABCD*",4) |
− | + | | class="sshl_f" |ABCD*ABCD*ABCD*ABCD* | |
− | | class="sshl_f" | *** | + | |
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="sshl_f" |REPT("-||-",3) |
− | | class="sshl_f" | | + | | class="sshl_f" |-||--||--||- |
− | | | + | |
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" |REPT("JOHN",0.2) | |
− | | class=" | + | | class="sshl_f" |JOHN |
− | | class=" | + | |
− | |||
− | | | ||
− | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="sshl_f" |REPT("$",3.6) |
− | + | | class="sshl_f" |$$$$ | |
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | | | ||
|} | |} | ||
− | + | == See Also == | |
− | + | ||
+ | *[[Manuals/calci/REPLACE |REPLACE ]] | ||
+ | *[[Manuals/calci/SUBSTITUTE |SUBSTITUTE ]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/] |
Revision as of 18:43, 27 December 2013
REPT(txt, numt)
- where is a text that is to be repeated
- is a positive number that specifies how many number of times to repeat the text.
REPT() repeats a text for specified number of times.
Description
REPT(txt, numt)
For Example,
REPT("*",5) returns *****
- should be enclosed in quotes.
- should be a positive number, else Calci ignores it and returns an empty text ("").
- If is equal to zero, Calci returns an empty text ("").
- If is a non-integer, Calci rounds it and displays the output.
Example
Function | Output | ||||
REPT("ABCD*",4) | ABCD*ABCD*ABCD*ABCD* | ||||
REPT("- | -",3) | - | -- | -- | - |
REPT("JOHN",0.2) | JOHN | ||||
REPT("$",3.6) | $$$$ |