[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
REPLICATE()
Return a string repeated a specified number of times
------------------------------------------------------------------------------
Syntax
REPLICATE(<cString>, <nCount>) --> cRepeatedString
Arguments
<cString> is the character string to be repeated.
<nCount> is the number of times to repeat <cString>.
Returns
REPLICATE() returns a character string up to a maximum of 65,535 (64K)
bytes in length. Specifying a zero as the <nCount> argument returns a
null string ("").
Description
REPLICATE() is a character function that repeatedly displays, prints, or
stuffs the keyboard with one or more characters. REPLICATE() is like
the SPACE() function, which returns a specified number of space
characters.
Examples
. These examples demonstrate REPLICATE() repeating strings:
? REPLICATE("*", 5) // Result: *****
? REPLICATE("Hi ", 2) // Result: Hi Hi
? REPLICATE(CHR(42), 5) // Result: *****
. This example uses REPLICATE() to stuff the keyboard with
several Down arrow keys:
#include "Inkey.ch"
KEYBOARD REPLICATE(CHR(K_DOWN), 25)
Files Library is CLIPPER.LIB.
See Also:
SPACE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson