Publication
ANSS 1981
Conference paper

A pictorial format function for patterning decorated numeric displays

View publication

Abstract

An extension to the APL dyadic format function is proposed, using a character vector left argument. This argument is a literal pattern having the exact length of the last dimension of the resultant array. No special markers are required to separate adjacent numeric fields, arbitrary decorations may appear within or outside of fields, negative or positive numbers can be distinguished by symbols of choice, and there is provision for accommodating the number representation practices of different countries. The extension completely covers the present functional capability of dyadic format with one minor exception (and possible improvement) in a detail of exponential presentation. In the proposed extension, format information is carried in three ways: in the structure of the pattern, in the choice of digits to denote number fields, and in a system variable. Common requirements, such as the use of commas, floating negative signs on either or both sides of a number, and optional suppression of zero values, are achieved very simply. This paper will describe the evolution of this proposal, which was first discussed at APL/73, give a rigorous formulation of the rules, and show examples of its use.

Date

Publication

ANSS 1981

Authors

Share