![]() Chapter Contents |
![]() Previous |
![]() Next |
| MLENGTH |
| Category: | Character |
| Syntax | |
| Details | |
| Example | |
| See Also |
Syntax |
| length=MLENGTH(var); |
Type: Numeric
Type: Character
| Details |
MLENGTH is different from LENGTH, which returns the trimmed length. For window variables, MLENGTH returns the length of the variable in the display.
If a numeric variable is passed to MLENGTH, MLENGTH always returns a length of 8 for the variable. For non-window variables, MLENGTH returns the declared length of the variable.
| Example |
In this example, MLENGTH returns the value
5, which is the declared length of variable S. However, LENGTH returns the
value 2, because S contains
ab.
length s $ 5; s='ab'; l=length(s); m=mlength(s);
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.