4,494
edits
(→Value) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Built-in|Atomic vector|⎕AV}} is the name of a 256-[[character]] [[vector]] which | {{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. | ||
[[Standards|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 < | 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 === | ||
[[ | [[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> | <pre> | ||
Line 23: | Line 25: | ||
⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ | ⌿⍀≥≤≠×÷⍙∘⍵⍫⍋⍒¯¨ | ||
</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. | ||
<pre> | <pre> | ||
⍐ ⍗ ⍇⍈ ⍱⍲ | |||
⍒⍋⌽⍉⊖⍟⌶⍫⍎⍕⍀⌿⍝⍞!⌹ | ⍒⍋⌽⍉⊖⍟⌶⍫⍎⍕⍀⌿⍝⍞!⌹ | ||
¨)<≤=>]∨^≠÷,+./ | ¨)<≤=>]∨^≠÷,+./ | ||
Line 45: | Line 48: | ||
=== Dyalog APL === | === Dyalog APL === | ||
< | <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> | ||
⌶ɫ%'⍺⍵ | ⌶ɫ%'⍺⍵ |