ForStack: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
The '''ForStack''' [[config]] specification changes the size of the [[For/Next]] stack, which keeps track of each different variable incremented in a program's For/Next loops.
The '''ForStack''' [[config]] specification changes the size of the [[For]]/[[Next]] stack, which keeps track of each different variable incremented in a program's For/Next loops.


====Comments and Examples====
====Comments and Examples====

Revision as of 18:30, 17 July 2013

The ForStack config specification changes the size of the For/Next stack, which keeps track of each different variable incremented in a program's For/Next loops.

Comments and Examples

The For/Next stack counts loop variables by name, regardless of how many times they are used in a program. Thus, if I is used as a loop variable (FOR I = 1 TO...) once in a program, it takes up one For/Next stack variable. But if I is used twenty times as a loop variable, it still takes up just one For/Next stack variable.

Syntax

Start-up Default

FORSTACK 20

Parameter

"Integer" is a decimal number that represents the number of variables the For/Next stack should hold. This number must be greater than 4.

Technical Considerations

  1. ForStack may be specified only in BRConfig.sys; it is not valid with the config statement.
  2. An error message (error code 9004) appears when a program uses more than the allotted number of For/Next variables.
  3. The available amount of user memory is affected by the amount of memory used by all the stacks together. It is important to maintain an adequate amount of user memory.