Atomic vector: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
Line 13: Line 13:
└┴┬├─┼↑↓╚╔╩╦╠═╬≡⍸⍷∵⌷⍂⌻⊢⊣⋄┘┌█▄¦Ì▀
└┴┬├─┼↑↓╚╔╩╦╠═╬≡⍸⍷∵⌷⍂⌻⊢⊣⋄┘┌█▄¦Ì▀
⍺ß⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∊∩⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ 
⍺ß⊂⊃⍝⍲⍴⍱⌽⊖○∨⍳⍉∊∩⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ 
</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.
The atomic vector can be displayed with <source lang=apl inline>16 16⍴mask\(mask←32≤⎕UCS ⎕AV)/⎕AV</source>:
<pre>
      ⍐ ⍗ ⍇⍈ ⍱⍲
⍒⍋⌽⍉⊖⍟⌶⍫⍎⍕⍀⌿⍝⍞!⌹
¨)<≤=>]∨^≠÷,+./
0123456789([;×:\
¯⍺⊥∩⌊∊_∇{⍳∘'⎕|⊤○
*?⍴⌈~↓∪⍵⊃↑⊂←⊢→≥-
⋄ABCDEFGHIJKLMNO
PQRSTUVWXYZ∆⊣⍪$}
┌┐└┘─│┼├┤┴┬  Í
"#%&@£`≡≢⍷⍸  ⍤⍥⌷
ÄÅÇÉÑÖÜáàâäãåçéè
êëíìîïñóòô⍥õúùûü
ÀÃÕ  Ææ⍬Øø¿¡ßÿ
abcdefghijklmno
pqrstuvwxyz⍙È€
</pre>
</pre>



Revision as of 05:10, 7 July 2020

⎕AV

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.

Value

APL2

APL 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:

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

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.

The atomic vector can be displayed with 16 16⍴mask\(mask←32≤⎕UCS ⎕AV)/⎕AV:

      ⍐ ⍗ ⍇⍈ ⍱⍲
⍒⍋⌽⍉⊖⍟⌶⍫⍎⍕⍀⌿⍝⍞!⌹
 ¨)<≤=>]∨^≠÷,+./
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.[1] It no longer contains all the glyphs used for primitive functions and operators[2], but can be adjusted by setting the Atomic Vector - Unicode (⎕AVU) variable to a list of Unicode code points. The default value is:

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

GNU APL

In GNU APL:

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

External links

Documentation

References

  1. Bernard Legrand. Mastering Dyalog APL (page 525). Dyalog Ltd. November 2009.
  2. Adám Brudzewsky SBCS (Single Byte Character Set) Usage
APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare RootRound
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 axisIdentity (Null, Ident)
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)Identity (Lev, Dex)
Quad names Index originComparison toleranceMigration levelAtomic vector