Microsoft KB Archive/43698

= &quot;COMMON in Quick Library Too Small&quot;: Use NAMED COMMON =

Article ID: 43698

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS

-



This article was previously published under Q43698



SUMMARY
If the COMMON block in a main program module is larger than the COMMON block of a loaded Quick library subprogram, the error &quot;COMMON in Quick library too small&quot; occurs. In an executable (EXE) form (LINKed with an equivalent LIB), the error does not occur.

To work around this behavior, use a named COMMON block for the Quick library subprograms.

This information applies to QuickBasic versions 4.0, 4.0b, and 4.5, to the QB.EXE environment shipped with Microsoft Basic Compiler versions 6.0 and 6.0b, and to the QBX.EXE environment shipped with Microsoft Basic PDS versions 7.0 and 7.1.

Code Example
The following code example causes the &quot;COMMON in Quick library too small&quot; error when run in the environment; the workaround is described in comments.

Calling Program
COMMON a%, b%, c%       'workaround: COMMON /qlbcommon/ a%, b% REM    So other programs can use also: COMMON a%, b%, c% CALL test END

Quick Library TEST.QLB
COMMON a%, b%           'workaround: COMMON /qlbcommon/ a%, b%

SUB Test

PRINT a%, b%

END SUB

Additional query words: QuickBas BasicCom 4.00 4.00b 4.50 7.00 7.10 6.00 6.00b

Keywords: KB43698

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.