Quoted String and H Format Codes

Available Format Codes

On output, any quoted strings or Hollerith constants are sent directly to the output. On input, they are ignored.

The syntax for a quoted string is:

"string" or 'string' 

where string is the string to be output.

Note
Quoted strings must be enclosed in either single or double quotation marks; use the type of quotation mark that is not used to enclose the entire format string.

For example, the IDL statement,

PRINT, FORMAT = '("Value: ", I0)', 23 

results in the following output:

Value: 23 

Note that it would have been equally correct to use double quotes around the entire format string and single quotes around the quoted string "Value: ".

Another way to specify a quoted string is with a Hollerith constant.

The syntax for a Hollerith constant is:

nHc1c2 c3 ... cn 

where

n

is the number of characters in the constant (1 ≤ ≤ 255).

ci

is the characters that make up the constant. The number of characters must agree with the value provided for n.

For example, the following IDL statement,

PRINT, FORMAT = '(7HValue: , I0)', 23 

results in the following output:

Value: 23 

See C printf-Style Quoted String Format Code for an alternate form of the Quoted String Format Code that supports C printf-style capabilities.