advr.hlp (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.
CLEAR Statement Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 CLEAR [,,stacksize&]
 
 Usage Notes
   ■ If your program has deeply nested subroutines or procedures, or if you
     use recursive procedures, you may want to use a CLEAR statement to
     increase the stack size. You may also want to increase the stack size
     if your procedures have a large number of arguments.
 
   ■ Clearing the stack destroys the return addresses placed on the stack
     during a GOSUB operation. This makes it impossible to execute a RETURN
     statement correctly, and Visual Basic generates a "RETURN without GOSUB"
     run-time error message. If you use a CLEAR statement in a SUB or
     FUNCTION statement, Visual Basic generates the run-time error message,
     "Illegal function call."