Atomic vector: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
m (Text replacement - "ISO/IEC 13751:2001" to "ISO/IEC 13751:2001")
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Built-in|Atomic vector|⎕AV}} is the name of a 256-[[character]] [[vector]] which containes the entire character set of older APL implementations that did not support [[Unicode]], but instead used a single byte to store each character. Its value varies wildly between dialects, and can even differ between editions of the same dialect. For example, the mainframe and personal computer editions of [[APL2]] have slightly different character sets.
{{Built-in|Atomic vector|⎕AV}} is the name of a 256-[[character]] [[vector]] which contains the entire character set of older APL implementations that did not support [[Unicode]], but instead used a single byte to store each character. Its value varies wildly between dialects, and can even differ between editions of the same dialect.
 
[[ISO/IEC 13751:2001]] standard defined atomic vector as: "An implementation-defined character vector containing every member of the ''required character set'' exactly once".<ref>BS ISO/IEC 13751:2001: Information technology. Programming languages, their environments and system software interfaces. Programming language Extended APL. (2001).</ref>


== Value ==
== Value ==
In the following, display of the the character sets are obtained using <syntaxhighlight lang=apl inline>16 16⍴mask\(mask←32≤⎕UCS ⎕AV)/⎕AV</syntaxhighlight> to replace control characters with spaces.
=== APL2 ===
=== APL2 ===
[[APL]] uses two primary values of <source lang=apl inline>⎕AV</source>, an [[wikipedia:ASCII|ASCII]]-based value on [[wikipedia:|personal computer]]s, and an [[wikipedia:EBCDIC|EBCDIC]]-based value on [[wikipedia:mainframe|]s. The ASCII-based value is:
[[APL2]] uses two primary values of <syntaxhighlight lang=apl inline>⎕AV</syntaxhighlight>, an [[wikipedia:ASCII|ASCII]]-based value on [[wikipedia:|personal computer]]s, and an [[wikipedia:EBCDIC|EBCDIC]]-based value on [[wikipedia:mainframe|mainframe]]s. The ASCII-based value is:
<pre>
               
               
!"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~
ÇüéâäàåçêëèïîìÄÅ
⎕⍞⌹ôöòûù⊤ÖÜø£⊥₧⌶
áíóúñѪº¿⌈¬½∪¡⍕⍎
░▒▓│┤⍟∆∇→╣║╗╝←⌊┐
└┴┬├─┼↑↓╚╔╩╦╠═╬≡
⍸⍷∵⌷⍂⌻⊢⊣⋄┘┌█▄¦Ì▀
⍺ß⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∊∩
⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ 
</pre>
 
=== APLX ===
In order to maximise the probability of being able to represent the text when converting from Unicode to internal representation, [[APLX]] accepts as input a number of alternative Unicode values for certain characters. However, these are automatically mapped to normalised character, and any unmappable characters are replaced with a question mark.
<pre>
<pre>
  !"#$%&'()*+,-./0123456789:;<=>?
      ⍐ ⍗ ⍇⍈ ⍱⍲
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
⍒⍋⌽⍉⊖⍟⌶⍫⍎⍕⍀⌿⍝⍞!⌹
`abcdefghijklmnopqrstuvwxyz{|}~
  ¨)<≤=>]∨^≠÷,+./
€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ
0123456789([;×:\
 ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿
¯⍺⊥∩⌊∊_∇{⍳∘'⎕|⊤○
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß
*?⍴⌈~↓∪⍵⊃↑⊂←⊢→≥-
àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
⋄ABCDEFGHIJKLMNO
PQRSTUVWXYZ∆⊣⍪$}
 
┌┐└┘─│┼├┤┴┬  Í
"#%&@£`≡≢⍷⍸  ⍤⍥⌷
ÄÅÇÉÑÖÜáàâäãåçéè
êëíìîïñóòô⍥õúùûü
ÀÃÕ  Ææ⍬Øø¿¡ßÿ
abcdefghijklmno
pqrstuvwxyz⍙È€
</pre>
</pre>
=== Dyalog APL ===
=== Dyalog APL ===
<source lang=apl inline>⎕AV</source> is obsolete in [[Dyalog APL]] since the Unicode Edition was introduced and is only retained for backwards compatibility.<ref>Bernard Legrand. [https://www.dyalog.com/uploads/documents/MasteringDyalogAPL.pdf#page=525 Mastering Dyalog APL (page 525)]. [[Dyalog Ltd]]. November 2009.</ref> It no longer contains all the [[glyph]]s used for [[primitive function]]s and [[primitive operator|operators]]<ref>[[Adám Brudzewsky]] [https://github.com/abrudz/SBCS/blob/master/README.md#usage SBCS] (Single Byte Character Set) Usage</ref>, but can be adjusted by setting the [[Atomic Vector - Unicode]] (<source lang=apl inline>⎕AVU</source>) variable to a list of Unicode code points. The default value is:
<syntaxhighlight lang=apl inline>⎕AV</syntaxhighlight> is obsolete in [[Dyalog APL]] since the Unicode Edition was introduced and is only retained for backwards compatibility.<ref>Bernard Legrand. [https://www.dyalog.com/uploads/documents/MasteringDyalogAPL.pdf#page=525 Mastering Dyalog APL (page 525)]. [[Dyalog Ltd]]. November 2009.</ref> It no longer contains all the [[glyph]]s used for [[primitive function]]s and [[primitive operator|operators]]<ref>[[Adám Brudzewsky]] [https://github.com/abrudz/SBCS/blob/master/README.md#usage SBCS] (Single Byte Character Set) Usage</ref>, but can be adjusted by setting the [[Atomic Vector - Unicode]] (<syntaxhighlight lang=apl inline>⎕AVU</syntaxhighlight>) variable to a list of Unicode code points. The default value is:
<pre>
<pre>
      6 41⍴10↓⎕AV
          ⌶ɫ%'⍺⍵
⌶ɫ%'⍺⍵_abcdefghijklmnopqrstuvwxyz��¯.⍬012
_abcdefghijklmno
3456789�⊢¥$£¢∆ABCDEFGHIJKLMNOPQRSTUVWXYZ�
pqrstuvwxyz  ¯.
�ý·⍙ÁÂÃÇÈÊËÌÍÎÏÐÒÓÔÕÙÚÛÝþãìðòõ{€}⊣⌷¨ÀÄÅÆ
0123456789 ⊢¥$£¢
⍨ÉÑÖØÜßàáâäåæçèéêëíîïñ[/⌿\⍀<≤=≥>≠∨∧-+÷×?
∆ABCDEFGHIJKLMNO
⍴~↑↓⍳○*⌈⌊∇∘(⊂⊃∩∪⊥⊤|;,⍱⍲⍒⍋⍉⌽⊖⍟⌹!⍕⍎⍫⍪≡≢óôöø
PQRSTUVWXYZ  ý·
"#&´┘┐┌└┼─├┤┴┬│@ùúû^ü`∣¶:⍷¿¡⋄←→⍝)]� §⎕⍞⍣
⍙ÁÂÃÇÈÊËÌÍÎÏÐÒÓÔ
ÕÙÚÛÝþãìðòõ{€}⊣⌷
¨ÀÄÅÆ⍨ÉÑÖØÜßàáâä
åæçèéêëíîïñ[/⌿\⍀
<≤=≥>≠∨∧-+÷×?∊⍴~
↑↓⍳○*⌈⌊∇∘(⊂⊃∩∪⊥⊤
|;,⍱⍲⍒⍋⍉⌽⊖⍟⌹!⍕⍎⍫
⍪≡≢óôöø"# &´┘┐┌└
┼─├┤┴┬│@ùúû^ü`∣¶
:⍷¿¡⋄←→⍝)]  §⎕⍞⍣
</pre>
</pre>


=== GNU APL ===
=== GNU APL ===
In [[GNU APL]]:
[[GNU APL]] is fully Unicode-aware, and only includes the atomic vector for completeness:
<pre>
<pre>
      5 45⍴31↓⎕AV
               
  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK
               
LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx
  !"#$%&'()*+,-./
yz{|}~¥€⇄∧∼≬⋆⋸⌸⌺⌼μ⍁¡⍣⍅⎕⍞⌹⍆⍤⍇⍈⍊⊤λ⍍⍏£⊥⍶⌶⍐⍑χ≢⍖⍗
0123456789:;<=>?
⍘⍚⍛⌈⍜⍢∪⍨⍕⍎⍬⍪∣│┤⍟∆∇→╣║╗╝←⌊┐└┴┬├─┼↑↓╔╚╩╦╠═╬≡⍸⍷∵
@ABCDEFGHIJKLMNO
⌷⍂⌻⊢⊣◊┘┌█▄▌▐▀⍺⍹⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∈∩⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨
PQRSTUVWXYZ[\]^_
</pre>
`abcdefghijklmno
pqrstuvwxyz{|}~
¥€⇄∧∼≬⋆⋸⌸⌺⌼μ⍁¡⍣⍅
⎕⍞⌹⍆⍤⍇⍈⍊⊤λ⍍⍏£⊥⍶⌶
⍐⍑χ≢⍖⍗⍘⍚⍛⌈⍜⍢∪⍨⍕⍎
⍬⍪∣│┤⍟∆∇→╣║╗╝←⌊┐
└┴┬├─┼↑↓╔╚╩╦╠═╬≡
⍸⍷∵⌷⍂⌻⊢⊣◊┘┌█▄▌▐▀
⍺⍹⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∈∩
⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ </pre>


== External links ==
== External links ==
=== Typing ===
* [https://mego.github.io/CodePageKeyboard/ Code Page Keyboard]
=== Documentation ===
=== Documentation ===
* [http://microapl.com/apl_help/ch_020_070_060.htm APLX]
* [http://microapl.com/apl_help/ch_020_070_060.htm APLX]

Latest revision as of 00:24, 10 March 2024

⎕AV

Atomic vector (⎕AV) is the name of a 256-character vector which contains the entire character set of older APL implementations that did not support Unicode, but instead used a single byte to store each character. Its value varies wildly between dialects, and can even differ between editions of the same dialect.

ISO/IEC 13751:2001 standard defined atomic vector as: "An implementation-defined character vector containing every member of the required character set exactly once".[1]

Value

In the following, display of the the character sets are obtained using 16 16⍴mask\(mask←32≤⎕UCS ⎕AV)/⎕AV to replace control characters with spaces.

APL2

APL2 uses two primary values of ⎕AV, an ASCII-based value on personal computers, and an EBCDIC-based value on mainframes. The ASCII-based value is:

                 
                
 !"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~?
ÇüéâäàåçêëèïîìÄÅ
⎕⍞⌹ôöòûù⊤ÖÜø£⊥₧⌶
áíóúñѪº¿⌈¬½∪¡⍕⍎
░▒▓│┤⍟∆∇→╣║╗╝←⌊┐
└┴┬├─┼↑↓╚╔╩╦╠═╬≡
⍸⍷∵⌷⍂⌻⊢⊣⋄┘┌█▄¦Ì▀
⍺ß⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∊∩
⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ 

APLX

In order to maximise the probability of being able to represent the text when converting from Unicode to internal representation, APLX accepts as input a number of alternative Unicode values for certain characters. However, these are automatically mapped to normalised character, and any unmappable characters are replaced with a question mark.

       ⍐ ⍗ ⍇⍈ ⍱⍲
⍒⍋⌽⍉⊖⍟⌶⍫⍎⍕⍀⌿⍝⍞!⌹
 ¨)<≤=>]∨^≠÷,+./
0123456789([;×:\
¯⍺⊥∩⌊∊_∇{⍳∘'⎕|⊤○
*?⍴⌈~↓∪⍵⊃↑⊂←⊢→≥-
⋄ABCDEFGHIJKLMNO
PQRSTUVWXYZ∆⊣⍪$}

┌┐└┘─│┼├┤┴┬  Í
"#%&@£`≡≢⍷⍸  ⍤⍥⌷
ÄÅÇÉÑÖÜáàâäãåçéè
êëíìîïñóòô⍥õúùûü
ÀÃÕ  Ææ⍬Øø¿¡ßÿ
 abcdefghijklmno
pqrstuvwxyz⍙È€

Dyalog APL

⎕AV is obsolete in Dyalog APL since the Unicode Edition was introduced and is only retained for backwards compatibility.[2] It no longer contains all the glyphs used for primitive functions and operators[3], but can be adjusted by setting the Atomic Vector - Unicode (⎕AVU) variable to a list of Unicode code points. The default value is:

          ⌶ɫ%'⍺⍵
_abcdefghijklmno
pqrstuvwxyz  ¯.⍬
0123456789 ⊢¥$£¢
∆ABCDEFGHIJKLMNO
PQRSTUVWXYZ  ý·?
⍙ÁÂÃÇÈÊËÌÍÎÏÐÒÓÔ
ÕÙÚÛÝþãìðòõ{€}⊣⌷
¨ÀÄÅÆ⍨ÉÑÖØÜßàáâä
åæçèéêëíîïñ[/⌿\⍀
<≤=≥>≠∨∧-+÷×?∊⍴~
↑↓⍳○*⌈⌊∇∘(⊂⊃∩∪⊥⊤
|;,⍱⍲⍒⍋⍉⌽⊖⍟⌹!⍕⍎⍫
⍪≡≢óôöø"# &´┘┐┌└
┼─├┤┴┬│@ùúû^ü`∣¶
:⍷¿¡⋄←→⍝)]  §⎕⍞⍣

GNU APL

GNU APL is fully Unicode-aware, and only includes the atomic vector for completeness:

                
                
 !"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~?
¥€⇄∧∼≬⋆⋸⌸⌺⌼μ⍁¡⍣⍅
⎕⍞⌹⍆⍤⍇⍈⍊⊤λ⍍⍏£⊥⍶⌶
⍐⍑χ≢⍖⍗⍘⍚⍛⌈⍜⍢∪⍨⍕⍎
⍬⍪∣│┤⍟∆∇→╣║╗╝←⌊┐
└┴┬├─┼↑↓╔╚╩╦╠═╬≡
⍸⍷∵⌷⍂⌻⊢⊣◊┘┌█▄▌▐▀
⍺⍹⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∈∩
⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ 

External links

Typing

Documentation

References

  1. BS ISO/IEC 13751:2001: Information technology. Programming languages, their environments and system software interfaces. Programming language Extended APL. (2001).
  2. Bernard Legrand. Mastering Dyalog APL (page 525). Dyalog Ltd. November 2009.
  3. Adám Brudzewsky SBCS (Single Byte Character Set) Usage
APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)
Quad names Index originComparison toleranceMigration levelAtomic vector