Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

Sign Specifier (SIGN=)

The sign specifier temporarily changes the sign mode set when the file was opened. It is allowed in formatted output statements. SIGN= cannot appear in an I/O control list of a READ statement. This specifier takes the following form:

SIGN=c-expr

c-expr

Is a scalar default character expression that evaluates to 'PLUS', 'SUPPRESS', or 'PROCESSOR_DEFINED'.

Trailing blanks in the expression are ignored. The values specified are without regard to case.

If SIGN= does not appear, the sign editing mode is unchanged. If a SIGN= specifier appears, a namelist or a format specifier must also appear in the I/O control list.

The sign editing mode controls output of optional plus characters (+) in formatted numeric output list items.

If the sign editing mode is 'PLUS', a plus sign appears in all positions where a plus sign is otherwise optional. If the sign editing mode is 'SUPPRESS', a plus sign is not produced in any position where one is optional. If the sign editing mode is 'PROCESSOR_DEFINED', a plus sign may or may not appear where one is optional.

If the SS, SP or S edit descriptors are specified in the format of an output statement, they supersede the sign editing mode set by a SIGN= specifier in the I/O control list or when the file was opened.

See Also