1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-09-16 03:54:01 +00:00
qb64/internal/help/FRE.txt
Luke Ceddia b586eafd3b Integrated _BLINEINPUT into regular LINE INPUT for BINARY files
LINE INPUT will now use the faster method if passed a file handle
that has been opened FOR BINARY. As such, the _BLINEINPUT command
has been removed.

qb64.bas now takes advantage of this for reading from '$include files,
at least in Include Manager 1. Some tweaking of internal/source/main.txt
was required to get things into a sane state, so I'm holing off changing
the compiler any further so the auto-builder can make sure everything's
smoothed over.

Note: Everything should still compile as normal; I'm just being overcautious.
2014-07-27 00:06:17 +10:00

30 lines
No EOL
1.2 KiB
Text

The '''FRE''' function returns the amount of Memory available in bytes to running programs.
{{PageSyntax}}
:: memory = FRE(string_expression$)
:: memory = FRE(numerical_expression)
*'''[[Keywords currently not supported by QB64|Currently NOT supported in QB64!]]'''
* Any string expression returns the size, in bytes, of free string storage space.
* Also compacts the free string storage to a single block of memory.
* 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.
''Example:''
{{CodeStart}} '' ''
' {{Cl|$DYNAMIC}}
PRINT "Sizes in bytes before dimensioning arrays: "; {{Cl|FRE}}(""), {{Cl|FRE}}(0), {{Cl|FRE}}(-1), {{Cl|FRE}}(-2)
{{Cl|DIM}} Array(100, 100), Text$(5000)
PRINT "Sizes in bytes after dimensioning arrays: "; {{Cl|FRE}}(""), {{Cl|FRE}}(0), {{Cl|FRE}}(-1), {{Cl|FRE}} (-2) '' ''
{{CodeEnd}}
''Notes:'' Sizes returned may vary by computer used. FRE(-2) must be used in a running program!
{{PageNavigation}}