Chapter Contents

Previous

Next
REPEAT

REPEAT



Repeats a character expression

Category: Character


Syntax
Arguments
Details
Examples

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

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


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.