Help Center
Help CenterFreeBASIC

Frefunction

Returns the amount of free memory available

Operating System Functionsfunctiondocumented

Syntax

Declare Function Fre ( ByVal value As Long = 0 ) As UInteger

Parameters

NameDescription
valueUnused dummy parameter kept for backward compatibility; can be ignored.

Return value


Returns the amount of free memory, in bytes.

Description


Returns the free memory (ram) available, in bytes.

Remarks

Usage


result = Fre( [ value ] )

Differences from QB


  • The "value" argument is not checked, Fre will always return the free physical memory available

See also


Example


Dim mem As UInteger = Fre



Print "Free memory:"

Print

Print mem; " bytes"

Print mem  \ 1024; " kilobytes"

Print mem  \ (1024 * 1024); " megabytes"

Reference

  • Documented in KeyPgFre.html