Arrays: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 2,964: | Line 2,964: | ||
</lang> |
</lang> |
||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |
||
Line 2,999: | Line 3,001: | ||
a.put 3 to 1; |
a.put 3 to 1; |
||
a.item(1).print;</lang> |
a.item(1).print;</lang> |
||
=={{header|Little}}== |
|||
Arrays in Little are list of values of the same type and they grow dynamically. |
|||
<lang C>String fruit[] = {"apple", "orange", "Pear"}</lang> |
|||
They are zero-indexed. You can use END to get the last element of an array: |
|||
<lang C> |
|||
puts(fruit[0]); |
|||
puts(fruit[1]); |
|||
puts(fruit[END]); |
|||
fruit[END+1] = "banana";</lang> |
|||
=={{header|Logo}}== |
=={{header|Logo}}== |