Previous Application Programming: Files and Input/Output Next

A Format Code

Available Format Codes

The A format code transfers character data.

The syntax is:

[n]A[-][w]  

where the parameters "n" and "-" are as described in Syntax of Format Codes and the width specification is as follows:

 

w
is an optional width (0 £ w) specifying the number of characters to be transferred. If w is not specified, the entire string is transferred. On output, if w is greater than the length of the string, the string is right justified. On input, IDL strings have dynamic length, so w specifies the resulting length of input string variables. See Padding and Natural Width Formatting for additional details on the output width of a formatted value.

For example, the IDL statement,

PRINT, FORMAT = '(A6)', '123456789'  

generates the following output:

123456  

  IDL Online Help (March 06, 2007)