Microsoft KB Archive/34347: Difference between revisions
(importing KB archive) |
m (Text replacement - "&" to "&") |
||
Line 36: | Line 36: | ||
<br /> | <br /> | ||
In programs with CHAINed modules, you may have to change the stack size for the compiled application if you get "error 7" at the CHAIN statement. Compile all the modules with the "Create Program List File" option on and look in the listings under STORAGE in the "Symbol and Label Tables for: MAIN." Your main module needs to clear enough stack space for the largest STORAGE entry with code similar to this: | In programs with CHAINed modules, you may have to change the stack size for the compiled application if you get "error 7" at the CHAIN statement. Compile all the modules with the "Create Program List File" option on and look in the listings under STORAGE in the "Symbol and Label Tables for: MAIN." Your main module needs to clear enough stack space for the largest STORAGE entry with code similar to this: | ||
<pre class="codesample"> ' As above, heap& | <pre class="codesample"> ' As above, heap& is the heap space. stack& is the stack space | ||
heap& | heap&=100*1024& 'fill in the actual heap& you want to leave | ||
stack& | stack&=10000& 'use value from 'lst' file for the largest module | ||
IF SYSTEM(4) THEN 'compiled | IF SYSTEM(4) THEN 'compiled | ||
CLEAR,FRE(0)+FRE(-1)-heap& | CLEAR,FRE(0)+FRE(-1)-heap&-stack&,stack& | ||
ELSE 'interpreted | ELSE 'interpreted | ||
CLEAR,FRE(0)+FRE(-1)-heap& | CLEAR,FRE(0)+FRE(-1)-heap& | ||
END IF | END IF | ||
</pre> | </pre> |
Latest revision as of 14:13, 21 July 2020
Article ID: 34347
Article Last Modified on 11/21/2006
This article was previously published under Q34347
SUMMARY
The following information needs to be added to Page 540 in Appendix F of the "Microsoft QuickBasic 1.00 Basic Language Reference." This information was taken from the README file from the release disk:
In programs with CHAINed modules, you may have to change the stack size for the compiled application if you get "error 7" at the CHAIN statement. Compile all the modules with the "Create Program List File" option on and look in the listings under STORAGE in the "Symbol and Label Tables for: MAIN." Your main module needs to clear enough stack space for the largest STORAGE entry with code similar to this:
' As above, heap& is the heap space. stack& is the stack space heap&=100*1024& 'fill in the actual heap& you want to leave stack&=10000& 'use value from 'lst' file for the largest module IF SYSTEM(4) THEN 'compiled CLEAR,FRE(0)+FRE(-1)-heap&-stack&,stack& ELSE 'interpreted CLEAR,FRE(0)+FRE(-1)-heap& END IF
Additional query words: MQuickB readme docerr
Keywords: KB34347