Creating an Array: Difference between revisions

Content added Content deleted
(→‎{{header|Fortran}}: added some initializing example from array initialization; no ex for "merge" code... maybe there will be a better place to show it)
(→‎{{header|Smalltalk}}: added some code from array initialization)
Line 732: Line 732:
"put 100 as second value; you can put any object,
"put 100 as second value; you can put any object,
in particular SmallInteger"
in particular SmallInteger"
array at: 2 put: 100.</lang>
array at: 2 put: 100.
"initialize an array from a 'constant' given array"
array := Array withAll: #('an' 'apple' 'a' 'day' 'keeps' 'the' 'doctor' 'away').
"Replacing apple with orange"
array at: 2 put: 'orange'.</lang>


=={{header|Standard ML}}==
=={{header|Standard ML}}==