Jump to content

Arrays: Difference between revisions

45 bytes removed ,  6 years ago
m
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>
 
1,015

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.