vbdpss.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Article Q40188, Example 2
                                                 Contents  Index  Back
─────────────────────────────────────────────────────────────────────────────
                           Knowledge Base Contents  Knowledge Base Index
 
 FRE(-2) Returns Fixed Lowest Value Even After Stack Shrinks, Example 2
 
 Example 2
 ---------
 
 The following example demonstrates a case in which adding an INPUT
 statement lets the value returned by FRE(-2) go back up:
 
 ' To try this example in VBDOS.EXE:
 ' 1. From the File menu, choose New Project.
 ' 2. Copy the code example to the Code window.
 ' 3. Press F5 to run the program.
 
    DECLARE SUB foo ()
    DEFINT A-Z
    CLS
    ' INPUT k   ' Adding this INPUT statement makes FRE(-2) go back up.
    PRINT FRE(-2)
    a$ = "Test string"
    CALL foo
    PRINT FRE(-2)
    END
 
    SUB foo
    SHARED a$
    PRINT "hello "; a$
    END SUB