Memory allocation: Difference between revisions
m
BBC BASIC moved to the BASIC section.
Drkameleon (talk | contribs) |
m (BBC BASIC moved to the BASIC section.) |
||
Line 219:
The optional second parameter to Buff() allows you to specify the byte to be filled with (default is zero).
=={{header|
===
====Heap====
<syntaxhighlight lang="bbcbasic"> size% = 12345
DIM mem% size%-1
PRINT ; size% " bytes of heap allocated at " ; mem%</syntaxhighlight>
Memory allocated from the heap is only freed on program termination or CLEAR.
====Stack====
<syntaxhighlight lang="bbcbasic"> size% = 12345
PROCstack(size%)
|