Array Initialization: Difference between revisions

add E examples
No edit summary
(add E examples)
Line 140:
y["world"] = 7;
</lang>
 
=={{header|E}}==
 
In accordance with its principle of determinism, you can never have an ''uninitialized'' array in E. If you want a (mutable) array with specific initial contents, start with those contents:
 
<lang e>[1,2,3,4].diverge()</lang>
 
If you want, say, all zeros, start by constructing the zeros:
<lang e>([0] * size).diverge()</lang>
 
If you want an array of some mutable objects, see [[N distinct objects#E]].
 
=={{header|Fortran}}==
Line 241 ⟶ 252:
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1.
$
 
 
=={{header|Haskell}}==