Type: Difference between revisions

Jump to navigation Jump to search
2 bytes added ,  14:27, 14 July 2020
m
Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com"
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
Line 5: Line 5:


== Support==
== Support==
Few dialects have Type as a [[primitive function]]. [[Dyalog APL]] uses <source lang=apl inline>∊</source> (as in ''prototypical '''e'''lement''), but only when [[migration level]] is 0, while [[NARS2000]] uses [[monadic]] <source lang=apl inline>⊤</source> (resembling the Latin letter '''T''' for '''''T'''ype''), which it inherited from [[NARS]]. [[Extended Dyalog APL]] uses monadic <source lang=apl inline>⍷</source> with the underscore indicating functionality of the corresponding non-underscored glyph from a non-default migration level.<ref>[[Partition]] is <source lang=apl inline>⊆</source> with migration level≤2 while the original glyph is <source lang=apl inline>⊂</source> as with migration level 3. Dyalog Language Reference Guide: [http://help.dyalog.com/latest/#Language/Symbols/Left%20Shoe.htm Left Shoe].</ref>
Few dialects have Type as a [[primitive function]]. [[Dyalog APL]] uses <source lang=apl inline>∊</source> (as in ''prototypical '''e'''lement''), but only when [[migration level]] is 0, while [[NARS2000]] uses [[monadic]] <source lang=apl inline>⊤</source> (resembling the Latin letter '''T''' for '''''T'''ype''), which it inherited from [[NARS]]. [[Extended Dyalog APL]] uses monadic <source lang=apl inline>⍷</source> with the underscore indicating functionality of the corresponding non-underscored glyph from a non-default migration level.<ref>[[Partition]] is <source lang=apl inline>⊆</source> with migration level≤2 while the original glyph is <source lang=apl inline>⊂</source> as with migration level 3. Dyalog Language Reference Guide: [https://help.dyalog.com/latest/#Language/Symbols/Left%20Shoe.htm Left Shoe].</ref>


However, in all dialects that support nested arrays, the type can be determined by enclosing/boxing the array in an empty array, and then coercing out a fill value. Since the [[array prototype]] is used as fill element, the resulting array will be the type of the original array:
However, in all dialects that support nested arrays, the type can be determined by enclosing/boxing the array in an empty array, and then coercing out a fill value. Since the [[array prototype]] is used as fill element, the resulting array will be the type of the original array:
Line 24: Line 24:
== External links ==
== External links ==
=== Documentation ===
=== Documentation ===
* [http://help.dyalog.com/latest/#Language/Primitive%20Functions/Type.htm Dyalog]
* [https://help.dyalog.com/latest/#Language/Primitive%20Functions/Type.htm Dyalog]
== References ==
== References ==
<references/>
<references/>
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar monadic functions]]
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar monadic functions]]

Navigation menu