Difference between revisions of "Manuals/calci/REPT"
Jump to navigation
Jump to search
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | =REPT( | + | <div style="font-size:30px">'''REPT (Text,Number_Times) '''</div><br/> |
− | *where <math> | + | *where <math>Text</math> is a text that is to be repeated |
− | *<math> | + | *<math>Number-Times</math> is a positive number that specifies how many number of times to repeat the text. |
− | + | **REPT(), repeats text a given number of times. | |
− | REPT() repeats a | ||
== Description == | == Description == | ||
− | REPT( | + | REPT (Text,Number_Times) |
For Example, | For Example, | ||
Line 14: | Line 13: | ||
REPT("*",5) returns ''*****'' | REPT("*",5) returns ''*****'' | ||
− | *<math> | + | *<math>Text</math> should be enclosed in quotes. |
− | *<math> | + | *<math>Number-Times</math> should be a positive number, else Calci ignores it and returns an empty text (""). |
− | *If <math> | + | *If <math>Number-Times</math> is equal to zero, Calci returns an empty text (""). |
− | *If <math> | + | *If <math>Number-Times</math> is a non-integer, Calci rounds it and displays the output. |
== Example == | == Example == | ||
Line 43: | Line 42: | ||
| class="sshl_f" |++++ | | class="sshl_f" |++++ | ||
|} | |} | ||
+ | |||
+ | ==Related Videos== | ||
+ | |||
+ | {{#ev:youtube|FdU_UTBUMfc|280|center|REPT}} | ||
== See Also == | == See Also == | ||
Line 50: | Line 53: | ||
==References== | ==References== | ||
+ | *[http://en.wikipedia.org/wiki/Repetition_(rhetorical_device) REPETITION] | ||
+ | |||
+ | |||
+ | |||
+ | *[[Z_API_Functions | List of Main Z Functions]] | ||
+ | |||
+ | *[[ Z3 | Z3 home ]] |
Latest revision as of 16:26, 13 August 2018
REPT (Text,Number_Times)
- 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 text a given number of times.
Description
REPT (Text,Number_Times)
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) | ++++ |
Related Videos
See Also
References