Simple examples: Difference between revisions
Jump to navigation
Jump to search
(→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''. | ||
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: | |||
<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 === |