$w. Format

Writes standard character data.
Category: Character
Alignment: left
Alias: $Fw.

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 default is 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, or use list output with the colon (:) format modifier and the format of your choice.

Example

put @10 name $5.;
put name $ 10-15;
Value of name1
Result
----+----1----+----2
#Cary
          Cary
Tokyo
         Tokyo
1The character # represents a blank space.