File: APlusRefV2_2.html

package info (click to toggle)
aplus-fsf 4.22.1-10.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 23,288 kB
  • sloc: cpp: 176,664; ansic: 27,023; sh: 6,322; makefile: 2,601; lisp: 2,151; perl: 704
file content (230 lines) | stat: -rw-r--r-- 16,448 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<HTML>
<HEAD>
<TITLE>About The A+ Reference Manual</TITLE>
</HEAD>
<A NAME=0>
<BODY BGCOLOR="#FFFFFF">
<A NAME=HEADING1>
<H1><FONT color="#FF0000">About This Document, the Online A+ Reference Manual</FONT></H1>
<a name="CONTENTS1">
<UL>
<A HREF="#HEADING3">  Other Sources of A+ Information</A><BR>
<A HREF="#HEADING9">  Organization of the Manual</A><BR>
<UL>
<A HREF="#HEADING10">  The Index</A><BR>
</UL>
<A HREF="#HEADING11">  Terms Used in the Manual</A><BR>
<UL>
<A HREF="#HEADING12">  Data Type and General Type</A><BR>
<A HREF="#HEADING13">  Index Origin</A><BR>
<A HREF="#HEADING14">  Comparison; Tolerably Equal</b></A><BR>
<A HREF="#HEADING15">  Names and Values</A><BR>
</UL>
<A HREF="#HEADING4">  Notation</A><BR>
<UL>
<A HREF="#HEADING5">  Font Usage</A><BR>
<A HREF="#HEADING6">  APL Font</A><BR>
<A HREF="#HEADING7">  Backquote</A><BR>
<A HREF="#HEADING8">  Capitalization</A><BR>
</UL>
<A HREF="#HEADING2">  Your Questions and Comments</A><BR>
</UL>
<HR>
<blockquote>
This manual describes the A+ programming environment. It is intended mainly for reference.
<p>
It is recommended that you use Netscape Navigator, Release 4.0 or later.
Some portions of these manuals may display incorrectly with other browsers.
Be sure you have followed the <a href="ARstart.html">instructions</a> for displaying the
 special APL characters, so that you can see this document properly.
</blockquote>
<A NAME=HEADING3>
<H1><FONT color="#20B2AA">Other<A NAME=3> Sources of A+ Information</FONT></H1>
<blockquote>Be sure to check the A+ Home Page periodically
(<A HREF="http://www.aplusdev.org" TARGET=_parent>www.aplusdev.org</a>).
News items will be posted there from time to time.
There is also a heading on the A+ Home Page
marked "<A HREF="http://www.aplusdev.org/Documentation" TARGET=_parent>Documentation</a>",
which can direct you to some related material, such as tutorials.
</blockquote>
<A NAME=HEADING9>
<H1><FONT color="#20B2AA">Organization <A NAME=9>of the Manual</FONT></H1>
<blockquote>
Because this manual is intended mostly for reference, the descriptions of the primitive
 functions, operators, system functions, system variables, and commands are listed
 alphabetically, by their English names, i.e., names such as Add, Rank, Expunge, Print
 Precision, and Load.  In the text itself, the subheadings include their A+ names also. The
 attributes are listed alphabetically in the table "<A HREF="APlusRefV2_23.html#21">Display
 Attributes</A>", with brief descriptions and links to other text where appropriate.<P>
Among the tables in The "Quick Reference" appendix are four that should be mentioned here.
 "<A HREF="APlusRefV2_63.html#3">Primitive Function and Operator Names and Links</A>" lists
 the symbols for the primitive functions and operators, ordered by category (arithmetical,
 logical, structural, and so on), gives the corresponding names, and has links
 to their descriptions.  A symbol's dyadic definition has been preferred to its monadic
 definition where the two would dictate different categories.
 "<A HREF="APlusRefV2_63.html#4">System Function Names and Links</A>",
 "<A HREF="APlusRefV2_63.html#5">System Variable Names and Links</A>", and
 "<A HREF="APlusRefV2_63.html#6">System Command Names and Links</A>" are alphabetized by A+
 name and give the corresponding English names, with links.<P>
To find any additional information about an item in a table that does not have a link for
 it, look up the item in the index.
</blockquote>
<A NAME=HEADING10>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;The Index</FONT></H2>
<blockquote>
All system commands, system functions, and system variables are listed in their A+ forms in
 the index under these three headings ("system commands", etc.).  They are listed separately
 under their English names, as well.  Primitive functions and operators are each listed
 under one or more English names.  The A+ symbols are listed in the
 "<A HREF="APlusRefV2_67.html#0">Symbols</A>" section of the index, and can also be found
 (with links) in tables in the "<A HREF="APlusRefV2_63.html#0">Quick Reference</A>"
 appendix, as already mentioned.<P>
The index includes entries for commonly used alternate names of primitive functions and
 operators; such an entry includes the name used in this
 manual, shown in parenthesis, and a link to the section in which the function is
 defined. The entry constitutes a <i>see</i> reference, while giving you a direct path when
 all you want is the principal reference for the function.  Entries for certain other terms
 are of this form.<P>
References for an entry are shown as arrows; where there are several, they are separated by
 commas and the principal one, if any, is indicated by an asterisk following the arrow. For
 long sections, where a range of pages is shown in the printed version, a link to the end of
 the section is indicated by "end" following the arrow.  Links following "<i>see</i>" or
 "<i>see also</i>" or "<i>also see</i>" lead to other index entries.
</blockquote>
<A NAME=HEADING11>
<H1><FONT color="#20B2AA">Terms <A NAME=11>Used in the Manual</FONT></H1>
<A NAME=HEADING12>
<H2><FONT color="#20B2AA"><b>&nbsp;&nbsp;&nbsp;Data Type and General Type</b></FONT></H2>
<blockquote>
There are seven data types in A+: character, integer, floating point, null, box, symbol, and function.  The term </b><i>integer</i> is always used in this manual in this strict sense, to indicate not only a domain of values but also a particular internal representation, the one identified by the A+ type integer (<font face=Kapl>`int</font>, as the Type function calls it).  <i>Integral</i> and <i>integral value</i> also refer to both domain and representation.<P>
<A NAME=12>The term <i>restricted whole number</i> is used to refer to any representation,
 integer or floating-point, of a member of the integral domain of values - that is, of a
 value for which integer internal representation is possible. The floating-point
 representations in the set of restricted whole numbers need only be equal to
 integers within the comparison tolerance or be
 less than<font face=Kapl> 1e-13 </font>in absolute value.
 See "<A HREF="APlusRefV2_9.html#0">Representation of Numbers</A>", especially its
 "<A HREF=APlusRefV2_9.html#3>Comparison Tolerance</A>" section. (Put another way, a
 scalar <font face=Kapl>x</font> is a restricted whole number if either (1)<font
 face=Kapl> x </font>is<font face=Kapl> `int </font>or
 (2)<font face=Kapl> x </font>is<font face=Kapl> `float </font>and
 either<font face=Kapl> x </font>is less than<font face=Kapl> 1e-13 </font>or
 there is a<font face=Kapl> y </font>such
 that<font face=Kapl> x=y </font>is 1
 and<font face=Kapl> y </font>is<font face=Kapl> `int</font>.)
 The chief significance of this concept, of course, is that
 any floating-point representation that represents a restricted whole number can always be
 faithfully coerced to an integer representation. All empty arrays are included in this
 set, as discussed below.<P>
Many A+ functions and operators take arguments of several types, sometimes with some
 limitation, and it is convenient to divide A+ data objects into three classes, as they do.
 These classes are called <i>general types</i>:<P>
<UL>
<LI>character, consisting of simple arrays of characters<P>
<LI>numeric, consisting of simple arrays, unrestricted as to value, of floating-point numbers and integers<P>
<LI>mixed, containing all other data, namely
<UL type=disc>
<LI>simple arrays of functions and symbols
<LI>all nested arrays: box, function, and symbol
</UL>
</UL>
Because the set of restricted whole numbers and the general types are used mostly to
 indicate inclusion in the domains of functions, and because most functions accept empty
 arrays of any type, all empty arrays are included in the definition of restricted whole
 numbers and in each general type. For efficiency, the (empty) result of a mathematical
 function for a Null is whatever is most convenient for the function: Null, integer, or
 floating point.<P>
These words are used in the obvious ways, such as in the terms symbol array or symbolic array or array of symbols, meaning an array every element of which has data type symbol, and numeric array, meaning an array that has no elements or has only elements whose data type is integer or has only elements whose data type is floating point.  The more elaborate term array of type symbol, on the other hand, means only that the first item of the array is of type symbol - i.e., the first item of the first item of ... the first item is a symbol; the other items of the array can be of types symbol, function, or box.
</blockquote>
<A NAME=HEADING13>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;Index <A NAME=13>Origin</FONT></H2>
<blockquote>
A+ enumerates lists and whatnot using the integers 0, 1, 2, ...; that is to say, A+ employs 0-origin indexing.  This manual uses i-th, for any letter i, in the same sense, to agree with A+.  The words first, second, third, and so on, however, are intended to convey their ordinary English meanings.  Hence if an element of some list is spoken of as the third element and also as the n-th element, then n has the value 2.  Digits are never used in such a construction: 0-th, 2-th, and so forth never appear again in this manual.
</blockquote>
<A NAME=HEADING14>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;Comparison; <A NAME=14>Tolerably Equal</FONT></H2>
<blockquote>
<A NAME=15>A+ makes some comparisons using a tolerance. See
 "<A HREF="APlusRefV2_9.html#0">Representation of Numbers</A>", especially its
 "<A HREF="APlusRefV2_9.html#3">Comparison Tolerance</A>" section. When two objects are
 equal within the tolerance, they are called <i>tolerably equal</i>. This term is also used
 in a more general way, to mean equal within the tolerance for those objects to which the
 tolerance applies and strictly equal for all others. Tolerably equal is said only with
 regard to comparisons that employ the tolerance under some circumstances.
</blockquote>
<A NAME=HEADING15>
<H2><FONT color="#20B2AA"><b>&nbsp;&nbsp;&nbsp;Names <A NAME=16>and Values</b></FONT></H2>
<blockquote>
<A NAME=17>If the name </b><font face=Kapl>x</font> has the value 2 associated with it, one normally says simply that <font face=Kapl>x</font> is 2.  This manual follows that or a similar usage, usually even in more complicated cases.  For example, suppose <font face=Kapl>g</font> is the name of a function and the value associated with <font face=Kapl>x</font> is <font face=Kapl>`g</font>, the symbol form of the name <font face=Kapl>g</font>; the manual may simply say that <font face=Kapl>x</font> is a function.  If <font face=Kapl>x</font> has the value <font face=Kapl>"`g"</font>, which is a character string that gives the display form of the symbol form of the name <font face=Kapl>g</font>, the manual may simply say that <font face=Kapl>x</font> names <font face=Kapl>g</font> when, say, <font face=Kapl>x</font> is an argument and its role is to supply the name of a function.
</blockquote>
<A NAME=HEADING4>
<H1><FONT color="#20B2AA"><A NAME=4>Notation</FONT></H1>
<blockquote>
<A NAME=7>The conventions adopted for the use of the APL font, capitalization, backquote, and quotation marks in this book are intended to promote simplicity, readability, and clarity.
</blockquote>
<A NAME=HEADING5>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;Font Usage</FONT></H2>
<blockquote>
<font face=kapl>APL font</font> (Kapl) is used as described under the heading "<A HREF="#8">APL Font</A>".<P>
<FONT FACE=Courier><b>Bold Courier </b></FONT>is used
 for commands and text that you must enter literally, wherever APL font is not
 appropriate.<P>
<FONT FACE=Courier> Light Courier </FONT>is used for
 filenames, pathnames, utilities, Unix commands and command-line options, environment
 variables, prompts, and so on, wherever neither Bold Courier nor APL font is
 appropriate, as in<br>
<FONT FACE=Courier>&nbsp;&nbsp;for(i=0;i&lt;n;++i)&nbsp;result-&gt;p[i]=ic(aobj);</FONT><br>
or "This function uses the system call <FONT FACE=Courier>ioctl()</FONT>".<P>
<i>Italic</i> is generally used for variable text that you must enter:  e.g.,<BR>
"<font face=Kapl>$load </font><i>filename</i>",<BR>
indicating that you must enter the A+ <font face=Kapl>$load</font> command
 followed by the name of a file, or<BR>
"Enter<br>
<FONT FACE=Courier><b>emacs</b> <i>filename</i></FONT>"<br>
to indicate that you must enter the Unix
 <font face=Kapl><FONT FACE=Courier>emacs</FONT></font> command followed by the name of
 a file.<P>
<b>Bold Times Roman </b>(or the bold weight of whatever proportional font you have selected)
 is used for keys and screen (GUI) elements, such as the <b>Shift</b> key, the combination
 <b>Shift-left-arrow</b>, and the <b>Options </b>menu.
</blockquote>
<A NAME=HEADING6>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;APL <A NAME=8>Font</FONT></H2>
<blockquote>
<OL>
<LI>The A+ names of system variables and functions, A+ commands, A+ defined functions and variables, and the s functions (the screen management functions <font face=Kapl>is</font>, <font face=Kapl>show</font>, etc.) and, of course, the A+ primitive function and operator symbols appear in APL font.<P>
<LI>All multicomponent A+ expressions appear in APL font, except that <font face=Kapl>`name</font> and <font face=Kapl>'name'</font> sometimes appear as just name, in ordinary text font, as discussed below.<P>
<LI>The A+ keywords (if, do, etc.) appear in APL font in multicomponent A+ expressions, as required by (2), but are shown in ordinary text font elsewhere - here, for instance.<P>
<LI>Numbers normally appear in ordinary text font.  APL font is used for them, however, in these cases:<P>
<UL>
<LI>the number is part of a larger A+ expression, so rule (2) applies;
<LI>the number is explicitly an entry or display in an A+ session;
<LI>the same number or an associated number occurs nearby in a setting that requires APL font, so consistency dictates the use of that font;
<LI>the number is expressed in a form peculiar to A+ (as distinct from mathematics or ordinary English), as in <font face=Kapl>2.78e-4</font>.<P>
</UL>
<LI>Names of attributes (for screen management) and names of the values that attributes can have are normally set in ordinary text font when they occur alone, but where a particular value is being explicitly given for an attribute, as in the "Default" column of a table, it may appear in APL font, together with a backquote or quotation marks, e.g., <font face=Kapl>`center</font>, <font face=Kapl>'kaplgallant'</font>.
</OL></blockquote>
<A NAME=HEADING7>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;Backquote</FONT></H2>
<blockquote>
The backquote (<font face=Kapl>`</font>) is used only for system variables and where the context explicitly requires a symbol.  Thus, in the "Attribute" column of a table, only names appear (e.g., titlefg), and of course the response to "<font face=Kapl>show `b</font>" is described as "<font face=Kapl>b</font> is displayed."
</blockquote>
<A NAME=HEADING8>
<H2><FONT color="#20B2AA">&nbsp;&nbsp;&nbsp;Capitalization</FONT></H2>
<blockquote>The English names of the A+ primitive functions and operators, as contrasted to their symbols, and of the system functions, variables, and commands always appear in ordinary text font, with an uppercase initial letter and sometimes another uppercase initial: Plus, Grade up, Pi times, Natural log, Value in Context, Less than or Equal to, Inner Product, Set Attribute, Random Link, Global Objects, and so on.<P>
<b>Note:  </b>Many names here, such as OLWM, Unix, Sparc, RS/6000, Helvetica, Times, and
 Palatino, are trademarks or registered trademarks.  Except occasionally for font names,
 initial uppercase letters have been used for those names believed to be trademarks.
</blockquote>
<A NAME=HEADING2>
<H1><FONT color="#20B2AA">Your <A NAME=1>Questions and Comments</FONT></H1>
<blockquote>
<b>Questions, comments, and corrections are welcome.</b>
 Please email them to doc@aplusdev, or, if
 the subject is of general interest or you seek a wider response, to aplus@aplusdev.org.
</blockquote>
<HR>
<ADDRESS><table width="100%"><tr><td><font size=2><i><a href="mailto:doc@aplusdev.org">doc@aplusdev.org</a></i></font></td><td align=right><font size=2><i>&#169; Copyright 1995&#150;2008 Morgan Stanley Dean Witter &amp; Co.  All rights reserved.</i></font></td></tr></table></ADDRESS>
</BODY>
</HTML>