Memory allocation: Difference between revisions
Content added Content deleted
m (BBC BASIC moved to the BASIC section.) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 1,857: | Line 1,857: | ||
The only type of memory allocation where the programmer has any control is the initial number of elements of a List though even here additional elements can be allocated by simply adding them. |
The only type of memory allocation where the programmer has any control is the initial number of elements of a List though even here additional elements can be allocated by simply adding them. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">// create a list with 10 elements all initialized to zero |
||
var squares = List.filled(10, 0) |
var squares = List.filled(10, 0) |
||
// give them different values and print them |
// give them different values and print them |