![]() Chapter Contents |
![]() Previous |
![]() Next |
| ROUND |
| Category: | Truncation |
| Syntax | |
| Arguments | |
| Details | |
| Examples |
Syntax |
| ROUND(argument,round-off-unit) |
| Details |
The ROUND function returns a value rounded to the nearest round-off unit. If round-off-unit is not provided, a default value of 1 is used and argument is rounded to the nearest integer.
| Examples |
| SAS Statement | Results |
|---|---|
var1=223.456; x=round(var1,1); put x 9.5; |
223.00000 |
var2=223.456; x=round(var2,.01); put x 9.5; |
223.46000 |
x=round(223.456,100); put x 9.5; |
200.00000 |
x=round(223.456); put x 9.5; |
223.00000 |
x=round(223.456,.3); put x 9.5; |
223.33333 |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.