qbasic.hlp (Topic list)
FRE Function
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Returns the amount (in bytes) of available or unused memory.
 
FRE(numeric-expression)
FRE(stringexpression$)
 
    ■ numeric-expression    A value that specifies the type of memory:
 
                            Value               FRE returns
                            ════════════════    ═════════════════════════════
                            -1                  The size of the largest array
                                                (nonstring) you can create
                            -2                  The unused stack space
                            Any other number    The available string space
 
    ■ stringexpression$     Any string expression. FRE compacts the free
                            string space into a single block, then returns
                            the amount of available string space.
 
Example:
    PRINT "String Space", FRE("")
    PRINT "Unused Stack Space", FRE(-2)
    PRINT "Array Space", FRE(-1)