Arrays: Difference between revisions

Content added Content deleted
Line 3,857:
=={{header|Oforth}}==
 
Array created with [ ... ] are immutable array.
Oforth has no Array class.
To havecreate a mutable array, a#new ListBuffer can beis used.
Lists are immutables and can act like arrays.
To have a mutable array, a ListBuffer can be used.
 
<lang Oforth>[ "abd", "def", "ghi" ] at( 3 ) println.
 
ListBufferArray new dup addAll( [1, 2, 3] ) dup put( 2, 8.1 ) println.
</lang>