Simple examples: Difference between revisions

Jump to navigation Jump to search
162 bytes added ,  17:36, 6 August 2021
The specific dialects are not important here, and the "try it" link doesn't actually try it.
(→‎Split text by delimiter: GNU isn't "more traditional", it just follows APL2 rather than NARS/Dyalog (both of which predate APL2))
(The specific dialects are not important here, and the "try it" link doesn't actually try it.)
Line 94: Line 94:
Notice that you can read the [[tacit]] function <source lang=apl inline>≠⊆⊢</source> like an English sentence: ''The inequality partitions the right argument''.
Notice that you can read the [[tacit]] function <source lang=apl inline>≠⊆⊢</source> like an English sentence: ''The inequality partitions the right argument''.


The above [[tacit]] syntax is not supported by [[GNU APL]]. Since it's based on [[APL2]], GNU uses <source lang=apl inline>⊂</source> as [[partition]]:
Many dialects do not support the above [[tacit]] syntax, and use the [[glyph]] <source lang=apl inline>⊂</source> for partition [[primitive function]]. In such dialects, the following formulation can be used:
[http://juergen-sauermann.de/try-GNU-APL Try it now!]
<source lang=apl>
<source lang=apl>
       (','≠s)⊂s←'comma,delimited,text'
       (','≠s)⊂s←'comma,delimited,text'
</source>
</source>
{{Works in|[[GNU APL]]}}
{{Works in|[[APL2]], [[APLX]], [[GNU APL]]}}
This assigns the text to the variable <source lang=apl inline>s</source>, then separately computes the partitioning vector and applies it.


=== Indices of multiple elements ===
=== Indices of multiple elements ===

Navigation menu