Anonymous user
Arrays: Difference between revisions
Add Avail entry
Thundergnat (talk | contribs) m (Perl6 -> Raku) |
(Add Avail entry) |
||
Line 977:
_ArrayDisplay($aInputs) ;Display the Array
</lang>
=={{header|Avail}}==
Avail supports tuples as its primary ordered collection.
<lang Avail>tup ::= <"aardvark", "cat", "dog">;</lang>
Tuple indices (officially referred to as "subscripts") are 1-based. One can provide an alternative if there is no element at a subscript using an else clause.
<lang Avail><"pinch", "tsp", "tbsp", "cup">[4] \\ "cup"
<3, 2, 1>[100] else [0]</lang>
Tuples are immutable, however one can quickly create a new tuple with a specified element replaced.
<lang Avail><"sheep", "wheat", "wood", "brick", "stone">[5] → "ore"</lang>
=={{header|AWK}}==
|