C5_REPLICATE

 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()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.