2,951
edits
Miraheze>Marshall (Primitive function tables) |
m (Links to complex numbers) |
||
(20 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox array language | |||
| array model = [[Flat array model|flat]] with [[Box|boxes]] | |||
| index origin = 0 or 1 | |||
| function styles = [[defined functions]] | |||
| numeric types = [[complex]] floats | |||
| unicode support = none | |||
| released = around 1979 | |||
| withdrawn = around 1993 | |||
| latest release = 002.140 / 1988 | |||
| platforms = S/370, x86 | |||
| operating systems = DOS/390, DOS, UNIX (AIX, Solaris), Linux | |||
| license = Free for personal use / Proprietary commercial software | |||
| developer = [[I.P. Sharp Associates]] | |||
| influenced by = [[APL\360]] | |||
| influenced = [[SAX]], [[J]], [[A+]], [[K]] | |||
| file ext = .saw, .saf, .sam | |||
| download = [http://www.sigapl.org/Archives/waterloo_archive/apl/sharp.apl/index.html SIGAPL] | |||
}} | |||
[[File:Old SHARP APL.png|thumb|right|SHARP APL running under DOSBox]] | |||
'''SHARP APL''' was a standalone version of APL offered by [[I.P. Sharp Associates]] (IPSA), who had previously offered APL interpretation as a timesharing service. IPSA employed many notable APL designers including [[Ken Iverson]], and SHARP APL was the source of many developments in [[flat array theory]]. | |||
== Primitive functions == | == Primitive functions == | ||
Line 150: | Line 170: | ||
| <source lang=apl inline>⍎</source> || * || [[Execute]] || || | | <source lang=apl inline>⍎</source> || * || [[Execute]] || || | ||
|} | |} | ||
== Primitive Operators == | |||
{| class=wikitable | |||
! Glyph !!colspan=2|Operands !!colspan=2|Ranks !! Monadic Call !! Dyadic Call | |||
|- | |||
| <source lang=apl inline>/</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Reduce]] || | |||
|- | |||
| <source lang=apl inline>⌿</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Reduce First|Reduce-down]] || | |||
|- | |||
| <source lang=apl inline>\</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Scan]] || | |||
|- | |||
| <source lang=apl inline>⍀</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || || [[Scan First|Scan-down]] || | |||
|- | |||
| <source lang=apl inline>/</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Replicate|Copy]]/[[Compress]] || | |||
|- | |||
| <source lang=apl inline>⌿</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Replicate|Copy]]-down/[[Compress]]-down || | |||
|- | |||
| <source lang=apl inline>\</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Expand]] || | |||
|- | |||
| <source lang=apl inline>⍀</source> || || <source lang=apl inline>m</source> || <source lang=apl inline>∞</source> || || [[Expand First|Expand-down]] || | |||
|- | |||
| <source lang=apl inline>⊂</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || <source lang=apl inline>rf lf</source> ||colspan=2| Swap | |||
|- | |||
| <source lang=apl inline>&</source> || || <source lang=apl inline>f</source> || <source lang=apl inline>∞</source> || <source lang=apl inline>∞ ∞</source> ||colspan=2| Select | |||
|- | |||
| <source lang=apl inline>⍤</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| On ([[close Over]]) | |||
|- | |||
| <source lang=apl inline>⍤</source> || <source lang=apl inline>f</source> || <source lang=apl inline>n</source> || <source lang=apl inline>n</source> || <source lang=apl inline>n n</source> ||colspan=2| [[Rank operator|Rank]] | |||
|- | |||
| <source lang=apl inline>⍤</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| [[Cut operator|Cut]] | |||
|- | |||
| <source lang=apl inline>⍥</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| Upon ([[close Atop]]) | |||
|- | |||
| <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || <source lang=apl inline>mg mg</source> ||colspan=2| [[close Under|Under]] | |||
|- | |||
| <source lang=apl inline>¨</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || <source lang=apl inline>mg</source> || ||rowspan="2"|With ([[Bind]]) || | |||
|- | |||
| <source lang=apl inline>¨</source> || <source lang=apl inline>f</source> || <source lang=apl inline>n</source> || <source lang=apl inline>mf</source> || || | |||
|- | |||
| <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>g</source> || <source lang=apl inline>2</source> || <source lang=apl inline>∞ ∞</source> || [[Alternant]] || [[Inner Product|Inner-product]] | |||
|- | |||
| <source lang=apl inline>.</source> || <source lang=apl inline>m</source> || <source lang=apl inline>g</source> || || <source lang=apl inline>∞ ∞</source> || || [[Tie]], [[Outer Product|Outer-product]] | |||
|- | |||
| <source lang=apl inline>.</source> || <source lang=apl inline>f</source> || <source lang=apl inline>m</source> || <source lang=apl inline>mf</source> || || [[Ply]] || | |||
|} | |||
== Implementation == | |||
=== Numeric types === | |||
SHARP originally supported only real numbers using double (8-byte) precision. Numbers were stored in one of three types: | |||
* Boolean, with one bit per value | |||
* Integer, with four bytes per value | |||
* Floating, with eight bytes per value | |||
[https://www.jsoftware.com/papers/satn40.htm SATN-40] describes the addition of complex numbers to SHARP APL. | |||
== External links == | |||
[[wikipedia:I._P._Sharp_Associates|Wikipedia]] | |||
{{APL dialects}} |