Variable size/Set: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
(New post without using external libraries, in addition to an existing post which uses the "Boost" library.)
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(2 intermediate revisions by one other user not shown)
Line 384:
 
There is also "double" floating point values (8 bytes). Variables of this type use the suffix #.
 
=={{header|Forth}}==
<syntaxhighlight lang="forth">
create cvar 0 c, \ char size variable
 
variable var \ cell size variable
 
2variable 2var \ 2 cells size variable
 
fvariable fvar \ float size variable
 
</syntaxhighlight>
 
=={{header|Fortran}}==
Line 1,070 ⟶ 1,082:
 
The programmer cannot specify a minimum size for a Map but can specify a minimum size for a List - in effect the amount of heap storage required to store its elements. This can still be increased dynamically by adding futher elements to the List. Here's an example.
<syntaxhighlight lang="ecmascriptwren">// create a list with 10 elements all initialized to zero
var l = List.filled(10, 0)
// give them different values and print them
9,479

edits