13.6.1 How it works
| Limit | Measured in | When exhausted |
|---|---|---|
| depth | active frames | failure recursionDepthExceeded |
| cells | live heap values | failure cellLimitExceeded |
| statements | statement entries | cut statementBudgetExhausted |
| time | the host's clock | cut without a diagnostic |
| live tasks | spawned, unfinished tasks | failure taskLimitExceeded |
The units are deterministic: they do not depend on the machine. An object takes one cell plus one per attribute; an array, one plus one per element; a text created at run time, one plus one per eight characters. Literals and what Write prints take no cells.
Four bars: depth, full and marked as exhausted; cells, statements and time, partly full.
ProgramA recursion that exhausts depth
Subroutine Bajar(n As Integer) As Integer
Return Bajar(n + 1) + 1;
EndSubroutine
Algorithm Profundo
Write Bajar(0);
EndAlgorithmDiagnostics
recursionDepthExceeded· error · 2:10 · Recursion depth limit reached: 100000
The program finishes with an error.
In short
- Limits are configured by the host; they are not part of the language.
- They are measured in deterministic units.
- Depth and cells fail; statements and time cut.