Assigning Values to an Array: Difference between revisions

added standard ml
(→‎{{header|Scheme}}: ++ smalltalk)
(added standard ml)
Line 318:
=={{header|OCaml}}==
{{works with|OCaml|}}
let writeToArray arr loc val = arr.(loc) <- val;;
(* equivalent to: *)
 
Array.set arr loc val;
variant:<br/>
{{works with|OCaml|}}
let writeToArray = Array.set
 
=={{header|Perl}}==
Line 488 ⟶ 486:
on: SystemExceptions.IndexOutOfRange
do: [ :sig | 'Out of range!' displayNl ].</lang>
 
=={{header|Standard ML}}==
Array.update (arr, loc, val);
 
=={{header|Tcl}}==
Anonymous user