Atomic vector: Difference between revisions

Jump to navigation Jump to search
166 bytes added ,  05:15, 7 July 2020
Line 2: Line 2:


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

Navigation menu