4,494
edits
No edit summary |
m (Text replacement - "</source>" to "</syntaxhighlight>") Tags: Mobile edit Mobile web edit |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 10: | Line 10: | ||
{| class=wikitable | {| class=wikitable | ||
| < | | <syntaxhighlight lang=apl inline>⎕ML=0</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl inline>Z←∊R</syntaxhighlight> | ||
| Monadic < | | Monadic <syntaxhighlight lang=apl inline>∊</syntaxhighlight> is interpreted as [[Type]] rather than [[Enlist]]. | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕ML=1</syntaxhighlight> | ||
| | | | ||
| Default behaviour | | Default behaviour | ||
|- | |- | ||
| rowspan=3 | < | | rowspan=3 | <syntaxhighlight lang=apl inline>⎕ML≥2</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl inline>Z←↑R</syntaxhighlight> | ||
| Monadic < | | Monadic <syntaxhighlight lang=apl inline>↑</syntaxhighlight> is interpreted as [[First]] rather than [[Mix]]. | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>Z←⊃R</syntaxhighlight> | ||
| Monadic < | | Monadic <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> is interpreted as [[Mix]] rather than [[First]]. | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>Z←≡R</syntaxhighlight> | ||
| Monadic < | | Monadic <syntaxhighlight lang=apl inline>≡</syntaxhighlight> returns a positive rather than a negative value, if its argument has non-uniform [[depth]]. | ||
|- | |- | ||
| rowspan=2| < | | rowspan=2| <syntaxhighlight lang=apl inline>⎕ML=3</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl inline>R←X⊂[K]Y</syntaxhighlight> | ||
| Dyadic < | | Dyadic <syntaxhighlight lang=apl inline>⊂</syntaxhighlight> is interpreted as [[Partition]] (<syntaxhighlight lang=apl inline>⊆</syntaxhighlight>) rather than [[Partitioned Enclose]]. | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕TC</syntaxhighlight> | ||
| The order of the elements of < | | The order of the elements of <syntaxhighlight lang=apl inline>⎕TC</syntaxhighlight> is the same as in APL2. | ||
|} | |} | ||
=== Work-arounds === | === Work-arounds === | ||
When migrating to Dyalog APL, the below drop-ins for the affected [[built-ins]] allow setting < | When migrating to Dyalog APL, the below drop-ins for the affected [[built-ins]] allow setting <syntaxhighlight lang=apl inline>⎕ML←1</syntaxhighlight> while preserving code behaviour. It is then safe to programmatically (as shown in the rightmost column) change all occurrences of the affected built-ins with their respective covers. | ||
{| class=wikitable | {| class=wikitable | ||
! Migrating from !! Define !! Then run this on all code | ! Migrating from !! Define !! Then run this on all code | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕ML=0</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl>Epsilon←{×⎕NC'⍺':⍺∊⍵ ⋄ ⊃0⍴⊂⍵}</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl inline>'''[^'']+''' '∊'⎕R'&' 'Epsilon'</syntaxhighlight> | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕ML=2</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl> | ||
UpArrow←{×⎕NC'⍺':⍺↑⍵ ⋄ ⊃⍵} | UpArrow←{×⎕NC'⍺':⍺↑⍵ ⋄ ⊃⍵} | ||
RightShoe←{×⎕NC'⍺':⍺↑⍵ ⋄ ↑⍵} | RightShoe←{×⎕NC'⍺':⍺↑⍵ ⋄ ↑⍵} | ||
EqualUnderbar←|≡ | EqualUnderbar←|≡ | ||
</ | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl inline>'''[^'']+''' '↑' '⊃' '≡'⎕R'&' 'UpArrow' 'RightShoe' 'EqualUnderbar'</syntaxhighlight> | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕ML=3</syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl> | ||
UpArrow←{×⎕NC'⍺':⍺↑⍵ ⋄ ⊃⍵} | UpArrow←{×⎕NC'⍺':⍺↑⍵ ⋄ ⊃⍵} | ||
RightShoe←{×⎕NC'⍺':⍺↑⍵ ⋄ ↑⍵} | RightShoe←{×⎕NC'⍺':⍺↑⍵ ⋄ ↑⍵} | ||
Line 61: | Line 61: | ||
LeftShoe←{×⎕NC'⍺':⍺⊆⍵ ⋄ ⊂⍵} | LeftShoe←{×⎕NC'⍺':⍺⊆⍵ ⋄ ⊂⍵} | ||
quadTC←(⎕UCS 8 13 10) | quadTC←(⎕UCS 8 13 10) | ||
</ | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang=apl inline>'''[^'']+''' '↑' '⊃' '≡' '⊂' '⎕TC'⎕R'&' 'UpArrow' 'RightShoe' 'EqualUnderbar' 'LeftShoe' ' quadTC'</syntaxhighlight> | ||
|} | |} | ||
Alternatively, the definitions can be used directly inside the text substitutions, whereby one avoids polluting existing code with these cover names. | Alternatively, the definitions can be used directly inside the text substitutions, whereby one avoids polluting existing code with these cover names. | ||
Line 71: | Line 71: | ||
{|class=wikitable | {|class=wikitable | ||
| < | | <syntaxhighlight lang=apl inline>⎕CS←1</syntaxhighlight> || [[Strand notation|Stranding]] is done before [[bracket indexing]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕CS←2</syntaxhighlight> || The [[name class]] of an invalid name is 4 rather than ¯1. | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⎕CS←4</syntaxhighlight> || Format (<syntaxhighlight lang=apl inline>⍕</syntaxhighlight>) and default output uses the same width for all columns, rather than determining the width separately for each column. | ||
|} | |} | ||
Line 84: | Line 84: | ||
* [https://help.dyalog.com/latest/#Language/System%20Functions/ml.htm Dyalog] | * [https://help.dyalog.com/latest/#Language/System%20Functions/ml.htm Dyalog] | ||
* [http://microapl.com/apl_help/ch_020_070_140.htm APLX] | * [http://microapl.com/apl_help/ch_020_070_140.htm APLX] | ||
{{APL built-ins}}{{APL glyphs}}[[Category:System constants]] | |||
{{APL built-ins}}[[Category:System constants]] |