Difference between revisions of "Manuals/calci/REPT"

From ZCubes Wiki
Jump to navigation Jump to search
Line 40: Line 40:
  
 
|- class="even"
 
|- class="even"
| class="sshl_f" |REPT("$",3.6)
+
| class="sshl_f" |REPT("+",3.6)
| class="sshl_f" |$$$$
+
| class="sshl_f" |++++
 
|}
 
|}
  

Revision as of 18:49, 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) ++++

See Also

References