Jump to content

APL syntax and symbols

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Shoaler (talk | contribs) at 13:00, 13 December 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Monadic operators

Name Example Meaning Unicode
Roll ?B Integer selected randomly from 1 through B
Ceiling B Least integer greater than or equal to B 2308
Floor B Greatest integer less than or equal to B 230A
Shape B Number of components in each dimension of B 9076
Not ~B Logical: ~1 is 0, ~0 is 1
Absolute value B Magnitude of B
Index generator B Vector of integers from 1 to B 9075
Exponential *B e to the B power
Negation -B Changes sign of B
Monadic plus +B No change to B
Signum ×B ¯1 if B<0; 0 if B=0; 1 if B>0 D7

Dyadic operators

Name Example Meaning Unicode
Less than A<B Comparison: 1 if true, 0 if false
Less than or equal AB Comparison: 1 if true, 0 if false 2264
Equal A=B Comparison: 1 if true, 0 if false
Greater than or equal AB Comparison: 1 if true, 0 if false 2265
Greater than A>B Comparison: 1 if true, 0 if false
Not equal AB Comparison: 1 if true, 0 if false 2260