Previous Page | Next Page

Formats

$w. Format



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 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.


Examples

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

Value of name* Results

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

Previous Page | Next Page | Top of Page