Arrays: Difference between revisions

Content deleted Content added
PatGarrett (talk | contribs)
→‎{{header|VBA}}: Option Base
Drkameleon (talk | contribs)
No edit summary
Line 952:
 
=={{header|Arturo}}==
<lang arturorebol>//; empty array
 
arrA: #()[]
<lang arturo>// empty array
arrA: #()
//; array with initial values
 
arrB: #(["one" "two" "three")]
// array with initial values
arrB: #("one" "two" "three")
//; adding an element to an existing array
 
arrB: arrB ++ "four"
// adding an element to an existing array
arrB: arrB + "four"
print arrB
 
//; another way to add an element
append! 'arrB "five"
print arrB
//; retrieve an element at some index
print arrB.\1</lang>
{{out}}
 
#("<pre>one" "two" "three" "four")
// retrieve an element at some index
#("one" "two" "three" "four" "five")
print arrB.1</lang>
two</pre>
 
{{out}}
 
<pre>
#("one" "two" "three" "four")
#("one" "two" "three" "four" "five")
two
</pre>
 
=={{header|AutoHotkey}}==