Replicate()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

Replicate()

Syntax

Replicate( <CharacterValue>, <NumericValue> )

 

Purpose

To return <CharacterValue> repeated <NumericValue> times.

 

Parameters

<CharacterValue> is the character value to repeat.

 

<NumericValue> is the number of times to repeat it.

 

Returns

A Character value.

 

Usage

Designed for use in a report format definition, the "Replicate()" function is used to generate any number of occurrences of a sequence of one or more characters.

 

Examples

These examples demonstrate how "Replicate()" can repeat character values:

 

CALL

RESULT

Replicate( "*", 5 )

*****

Replicate( "Hi ", 2 )

Hi Hi

Replicate( CHR( 42 ), 5 )

*****

Replicate( "!", 20 )

!!!!!!!!!!!!!!!!!!!!

Replicate( "-", 25 )

-------------------------

Replicate( "DonorQuest", 2 )

DonorQuestDonorQuest

Replicate( "* ", 10 )

* * * * * * * * * *