Download Documentation Suite

Transcript
Language Guide
Ìpsû0 0 0 0
b
ABABA
BABAB 1 2
ABABA
CD EFGHIJ
Áî× Dyadic Format
Ranks: ∗ ∞; Implicit Arguments: Ìfc
The expression Áî× yields a character array; the appearance of the result is
controlled by Á in two different ways, depending upon whether the type of the
left argument Á is empty, numeric or character.
Dyadic Format with Empty Á
When Á is empty, dyadic format returns exactly the same result as monadic
format.
Dyadic Format with Numeric Á
When Á is numeric, dyadic format formats each of the columns of × according to
the specifications encoded in Á. As with monadic format, column refers to a
position along the last axis. That is, the interpreter treats × as if it were
((«/¢1ÕÒ×),¢1ÙÒ×)Ò×.
The left argument Á requires two integers to specify the format of each column of
×. In SHARP APL for UNIX Á is an integer vector whose length is twice that of
the last axis of ×.
Each pair of integers in Á controls the formatting of one column of ×. Alternatively,
Á may be a single pair, which then applies to all the columns of ×, or a single
integer, in which case it is treated as if it were the pair ¢2ÙÁ.
Unlike SHARP APL for OS/390, which requires that the number of pairs be the
same as the number of columns in ×, SHARP APL for UNIX recycles the pairs to
accommodate all the columns of ×. Within each Á-pair, the first element controls
the width of the resulting representation. The second element controls the type of
representation: the number of decimal places (positive for decimal representation);
the number of significant digits (negative for exponential representation).
4–84
UW-000-0802 (0009)
SHARP APL for UNIX