Migration level: Difference between revisions

Jump to navigation Jump to search
901 bytes added ,  08:43, 8 February 2021
no edit summary
Miraheze>Adám Brudzewsky
No edit summary
No edit summary
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Built-ins|Migration level|⎕ML|⎕EL}} or Evolution level is a number that, in [[Dyalog APL]] and [[APL+Win]] respectively, determines exact where the original [[NARS]] specification and the current [[APL2]] implementation differ. A lower value represents a behaviour closer to NARS, while a higher the value represents a behaviour closer to APL2.
{{Built-ins3|Migration level|⎕ML|⎕EL|⎕CS}}, '''Evolution level''', or '''Compatibility setting''' is a number that, in [[Dyalog APL]], [[APL+Win]], and [[APLX]] respectively, specifies exact behaviour relative to [[APL2]]. In Dyalog APL and APL+Win, a lower value represents a behaviour closer to the original [[NARS]] specification, while a higher the value represents a behaviour closer to APL2. In APLX, a lower value matches APL2 while a higher value indicates higher [[backwards compatibility]] with [[APL.68000]].
 
== APL+Win settings ==
 
[TBD]


== Dyalog settings ==
== Dyalog settings ==
Line 8: Line 12:
| <source lang=apl inline>⎕ML=0</source>
| <source lang=apl inline>⎕ML=0</source>
| <source lang=apl inline>Z←∊R</source>
| <source lang=apl inline>Z←∊R</source>
| Monadic <source lang=apl inline>∊</source> is interpreted as [[type]] rather than [[enlist]].
| Monadic <source lang=apl inline>∊</source> is interpreted as [[Type]] rather than [[Enlist]].
|-
|-
| <source lang=apl inline>⎕ML=1</source>
| <source lang=apl inline>⎕ML=1</source>
Line 16: Line 20:
| rowspan=3 | <source lang=apl inline>⎕ML≤2</source>
| rowspan=3 | <source lang=apl inline>⎕ML≤2</source>
| <source lang=apl inline>Z←↑R</source>
| <source lang=apl inline>Z←↑R</source>
| Monadic <source lang=apl inline>↑</source> is interpreted as [[first]] rather than [[mix]].
| Monadic <source lang=apl inline>↑</source> is interpreted as [[First]] rather than [[Mix]].
|-
|-
| <source lang=apl inline>Z←⊃R</source>
| <source lang=apl inline>Z←⊃R</source>
| Monadic <source lang=apl inline>⊃</source> is interpreted as [[mix]] rather than [[first]].
| Monadic <source lang=apl inline>⊃</source> is interpreted as [[Mix]] rather than [[First]].
|-  
|-  
| <source lang=apl inline>Z←≡R</source>
| <source lang=apl inline>Z←≡R</source>
Line 26: Line 30:
| rowspan=2| <source lang=apl inline>⎕ML=3</source>
| rowspan=2| <source lang=apl inline>⎕ML=3</source>
| <source lang=apl inline>R←X⊂[K]Y</source>
| <source lang=apl inline>R←X⊂[K]Y</source>
| Dyadic <source lang=apl inline>⊂</source> is interpreted as [[partition]] (<source lang=apl inline>⊆</source>) rather than [[partitioned enclose]].
| Dyadic <source lang=apl inline>⊂</source> is interpreted as [[Partition]] (<source lang=apl inline>⊆</source>) rather than [[Partitioned Enclose]].
|-  
|-  
| <source lang=apl inline>⎕TC</source>
| <source lang=apl inline>⎕TC</source>
Line 32: Line 36:
|}
|}


== Work-arounds ==
=== Work-arounds ===
When migrating to Dyalog APL, the below drop-ins for the affected [[built-ins]] allow setting <source lang=apl inline>⎕ML←1</source> 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.
When migrating to Dyalog APL, the below drop-ins for the affected [[built-ins]] allow setting <source lang=apl inline>⎕ML←1</source> 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.


Line 61: Line 65:
|}
|}
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.
== APLX settings ==
APLX treats the value as a collection of individual bits, thus allowing the combination of an exact set of behaviours:
{|class=wikitable
| <source lang=apl inline>⎕CS←1</source> || [[Strand notation|Stranding]] is done before [[bracket indexing]]
|-
| <source lang=apl inline>⎕CS←2</source> || The [[name class]] of an invalid name is 4 rather than ¯1.
|-
| <source lang=apl inline>⎕CS←4</source> || Format (<source lang=apl inline>⍕</source>) and default output uses the same width for all columns, rather than determining  the  width separately for  each column.
|}


== External links ==
== External links ==
Line 66: Line 82:
=== Documentation ===
=== Documentation ===


* [http://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]


{{APL built-ins}}
{{APL built-ins}}[[Category:System constants]]

Navigation menu