KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q63198: Main Module Must Be First BASIC File in Program List for PWB

Article: Q63198
Product(s): See article
Version(s): 7.10   | 7.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | SR# S900618-147 S_PWB PWB | mspl13_basic
Last Modified: 5-SEP-1990

The main module in a multiple-module program must be listed as the
first BASIC source file in the Program List for PWB.EXE (the
Programmer's WorkBench) to properly make the EXE file. If a
supporting module is listed first, its module-level code (virtually
nonexistent in most cases) is treated as the main entry point. This
produces an EXE that is approximately the correct size, but does
nothing.

To convert a given module in the Program List to the main module,
choose that module in the Edit Program List dialog and choose the To
Top Of List button.

This information applies to Microsoft BASIC Professional Development
System (PDS) version 7.10 for MS-DOS and MS OS/2.

For example, to make a Program List containing everything necessary
for the UIDEMO example program, UIDEMO.BAS must be listed at the
beginning of the BASIC files list. The incorrect and correct orders
are demonstrated below.

The following order of files does NOT create a working UIDEMO.EXE:

   GENERAL.BAS
   MENU.BAS
   MOUSE.BAS
   UIDEMO.BAS
   WINDOW.BAS
   UIASM.OBJ
   QBX.LIB

The above order does not work because GENERAL is taken as the main
module. Since GENERAL.BAS has no executable statements at the module
level, the program does nothing when run.

The correct order must have UIDEMO.BAS first:

   UIDEMO.BAS
   GENERAL.BAS
   MENU.BAS
   MOUSE.BAS
   WINDOW.BAS
   UIASM.OBJ
   QBX.LIB

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.