FRE - QB64 Wiki


From QB64 Wiki

Jump to: navigation, search

The FRE function returns the amount of Memory available in bytes to running programs.


memory = FRE(string_expression$)
memory = FRE(numerical_expression)

  • 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.


' $DYNAMIC PRINT "Sizes in bytes before dimensioning arrays: "; FRE(""), FRE(0), FRE(-1), FRE(-2) DIM Array(100, 100), Text$(5000) PRINT "Sizes in bytes after dimensioning arrays: "; FRE(""), FRE(0), FRE(-1), FRE (-2)

Notes: Sizes returned may vary by computer used. FRE(-2) must be used in a running program!

Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in
  • What links here
  • Related changes
  • Special pages
  • Printable version