Arrays: Difference between revisions
Content added Content deleted
m (FutureBasic format fixed) |
(Add LDPL) |
||
Line 5,269: | Line 5,269: | ||
println: foo popFront. ;; "front" |
println: foo popFront. ;; "front" |
||
println: foo. ;; [1, 99]</syntaxhighlight> |
println: foo. ;; [1, 99]</syntaxhighlight> |
||
=={{header|LDPL}}== |
|||
<syntaxhighlight lang="ldpl">data: |
|||
myArray is list of numbers |
|||
procedure: |
|||
# add elements |
|||
push 1 to myArray |
|||
push 2 to myArray |
|||
push 3 to myArray |
|||
# access elements |
|||
display myArray:0 lf |
|||
# store elements |
|||
store 99 in myArray:0 |
|||
# remove elements |
|||
remove element at 1 from myArray |
|||
delete last element of myArray |
|||
# clear array |
|||
clear myArray |
|||
</syntaxhighlight> |
|||
=={{header|LFE}}== |
=={{header|LFE}}== |