2017-10-10 14:55:21 +00:00
|
|
|
'''This page is maintained for historic purposes. The keyword is [[Keywords currently not supported by QB64|not supported in QB64]].'''
|
|
|
|
----
|
|
|
|
The [[FRE]] function returns the amount of memory available in bytes to running programs.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
2017-10-10 14:55:21 +00:00
|
|
|
: {{Parameter|memory}} = [[FRE]]({{Parameter|stringExpression$}})
|
|
|
|
: {{Parameter|memory}} = [[FRE]]({{Parameter|numericalExpression}})
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{PageDescription}}
|
|
|
|
*'''[[Keywords currently not supported by QB64|Not supported in QB64.]]'''
|
|
|
|
* Any {{Parameter|stringExpression$}} returns the size, in bytes, of free string storage space.
|
|
|
|
** Also compacts the free string storage to a single block of memory.
|
|
|
|
* {{Parameter|numericalExpression}} can be:
|
|
|
|
** 0: returns the same value as using a string expression above.
|
|
|
|
** -1: returns the size of the largest non-string array in bytes that could be dimensioned.
|
|
|
|
** -2: returns the amount of stack space, in bytes, available to a running program.
|
|
|
|
** Any other numerical value returns the size of the next block of string memory storage space.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{PageExamples}}
|
2015-08-02 12:12:44 +00:00
|
|
|
{{CodeStart}} '' ''
|
|
|
|
' {{Cl|$DYNAMIC}}
|
2019-04-15 01:15:33 +00:00
|
|
|
PRINT "Sizes in bytes before dimensioning arrays: "; {{Cl|FRE}}(""), {{Cl|FRE}}(0), {{Cl|FRE}}(-1), {{Cl|FRE}}(-2)
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|DIM}} Array(100, 100), Text$(5000)
|
2019-04-15 01:15:33 +00:00
|
|
|
PRINT "Sizes in bytes after dimensioning arrays: "; {{Cl|FRE}}(""), {{Cl|FRE}}(0), {{Cl|FRE}}(-1), {{Cl|FRE}} (-2) '' ''
|
2015-08-02 12:12:44 +00:00
|
|
|
{{CodeEnd}}
|
2017-10-10 14:55:21 +00:00
|
|
|
''Notes:'' Sizes returned may vary by computer used. FRE(-2) must be used in a running program.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{PageNavigation}}
|