Chapter Contents

Previous

Next
$w.

$w.



Writes standard character data

Category: Character
Alignment left
Alias: $Fw.


Syntax
Syntax Description
Comparisons
Examples

Syntax

$w.

Syntax Description

w
specifies the width of the output field. You can specify a number or a column range.
Default: 1 if the length of the variable is undefined; otherwise, the length of the variable
Range: 1-32767


Comparisons

The $w. format and the $CHARw. format are identical, and they do not trim leading blanks. To trim leading blanks, use the LEFT function to left align character data prior to output, or use list output with the colon (:) format modifier and the format of your choice.


Examples

put @10 name $5.;
put name $ 10-15;

Values* Results

----+----1----+----2
#Cary
          Cary
Tokyo
         Tokyo
*The character # represents a blank space.


Chapter Contents

Previous

Next

Top of Page

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