REPEAT Function


Repeats a character expression

Category: Character

Syntax

REPEAT ( argument,n )

Arguments

argument

  • specifies any SAS character expression.

n

  • specifies the number of times to repeat argument .

  • Restriction: n must be greater than or equal to 0.

Details

If the REPEAT function returns a value to a variable that has not yet been assigned a length, by default the variable is assigned a length of 200.

The REPEAT function returns a character value consisting of the first argument repeated n times. Thus, the first argument appears n +1 times in the result.

Examples

SAS Statements

Results

  x=repeat('ONE',2);   put x;  
  ONEONEONE  



SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net