Array length: Difference between revisions

Content added Content deleted
(Add Uiua)
(Added OmniMark solution)
 
Line 2,325: Line 2,325:
(print (size #("apple" "orange")))
(print (size #("apple" "orange")))
</syntaxhighlight>
</syntaxhighlight>

=={{header|OmniMark}}==
In OmniMark, From [https://developers.stilo.com/docs/html/concept/629.html OmniMark v12 documentation]:<br>
<big>"</big>&#xa0;<small>Most programming languages allow programmers to store and manipulate values in arrays, associative arrays, queues, and stacks. Instead, OmniMark provides a data container called a shelf: a shelf can be used to accomplish all of the tasks normally carried out by these various structures in other programming languages. Like arrays, shelves can be indexed by numeric values that reflect the position of the elements they contain or, like associative arrays, these elements can be given names (keys) and then indexed by those keys.</small>&#xa0;<big>"</big>

<syntaxhighlight lang="omnimark">
process
local stream s variable initial {"apple", "orange"}
local integer i initial {number of s}
put #main-output 'The number of fruit elements is %d(i).'
</syntaxhighlight>

'''Output:'''
<pre>
The number of fruit elements is 2.
</pre>


=={{header|Onyx}}==
=={{header|Onyx}}==