KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q28038: No "Incompatible Runtime" CHAIN Error with Mismatched COMMON

Article: Q28038
Product(s): See article
Version(s): 6.00   | 6.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00 buglist6.00b buglist7.00 runtime | mspl13_basic
Last Modified: 30-MAY-1990

The problem under Microsoft BASIC Compiler version 6.00 and 6.00b is
as follows:

1. A routine that has a blank COMMON block is built into a custom
   run-time module with BUILDRTM.EXE.

2. Main1 contains the same blank COMMON (matched exactly in length).

3. Main2 contains the same blank COMMON plus some more blank COMMON.

4. Main3 contains the same blank COMMON as Main2.

5. Main1 chains to Main2, which puts something in the EXTENDED portion
   of COMMON, then chains to Main3. Main3 expects something to be
   there, but it is gone.

There should be an error on the chain to Main2 since we cannot enlarge
blank COMMON when there is a set size of blank COMMON in the custom
run-time module. An error should have been generated during the chain.
When Main2 is run as a stand alone, the "incompatible runtime module"
error message appears.

Microsoft has confirmed this to be a problem in Microsoft BASIC
Compiler versions 6.00 and 6.00b, and in Microsoft BASIC Professional
Development System (PDS) version 7.00. We are researching this problem
and will post new information here as it becomes available.

When using Microsoft BASIC PDS version 7.00 for MS-DOS and MS OS/2,
any inclusion of a COMMON block into a custom run-time module will
result in an "incompatible runtime module" error, even if the COMMON
statement(s) in the run-time match the COMMON in the program(s).
If you link IMPORT.OBJ as the first .OBJ file on the link line,
this is not a problem.

The following is code example for Microsoft BASIC Compiler versions
6.00 and 6.00b:

MAIN1:

  common a,b,c     'This COMMON matches the COMMON in the custom run time
  a=1
  b=2
  c=3
  chain "main2"
  end

MAIN2:

  common a,b,c,d,e  'It is not legal to add more elements to the blank
                    'COMMON if you are using a custom run time.
  d=4
  e=5
  chain "main3"
  end

MAIN3:

  common a,b,c,d,e
  print a,b,c,d,e
  end

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.