Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>replicate()</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson