Microsoft KB Archive/39251

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Microsoft Knowledge Base

NOCOM.OBJ Supplement for QuickBasic 4.50 for Smaller .EXE

Last reviewed: September 25, 1997
Article ID: Q39251

4.50 MS-DOS kbprg kbfile kbdocerr

SUMMARY

On pages 349 and 357 of the "Microsoft QuickBasic 4.5: Programming in Basic" manual for version 4.50, the NOTE on the bottom of the page incorrectly states that NOCOM.OBJ is shipped with QuickBasic version 4.50.

To get NOCOM.OBJ for QuickBasic version 4.50:

You can find NOCOM450.EXE, a self-extracting file, on these services:

  • Microsoft's World Wide Web site on the Internet

          On the www.microsoft.com home page, click the Support icon
          Click Knowledge Base, and select the product
          Enter kbfile NOCOM450.EXE, and click GO!
          Open the article, and click the button to download the file
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the Softlib/Mslfiles folder
          Get NOCOM450.EXE
  • The Microsoft Network

          On the Edit menu, click Go To, and then click Other Location
          Type "mssupport" (without the quotation marks)
          Double-click the MS Software Library icon
          Find the appropriate product area
          Locate and Download NOCOM450.EXE
  • Microsoft Download Service (MSDL)

          Dial (425) 936-6735 to connect to MSDL
          Download NOCOM450.EXE

For additional information about downloading, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

For standalone .EXE files (that is, those compiled with the BC /O option) that use a string variable for the filename in the OPEN statement, linking to the file NOCOM.OBJ reduces the size of the programs by about 4K. NOCOM can be used only with programs that do NOT use serial communications.

MORE INFORMATION

The NOCOM.OBJ file was shipped with Microsoft Basic Compiler versions 6.00 and 6.00b; with Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10; and with QuickBasic versions 4.00 and 4.00b, but not with QuickBasic version 4.50 (due to lack of disk space).

The following text is taken from the NOCOM.DOC file in the MSL:

   Dear Microsoft Customer,

   Please find enclosed a copy of the NOCOM.OBJ file you requested for
   use with QuickBasic version 4.50. Before using this file, please
   read the following guidelines that explain when NOCOM is useful.

   If your program contains OPEN statements that use a string variable
   for the filename, the compiler will not recognize that this OPEN
   statement is not being used for data communications. The following
   is an example:

      a$ = "LPT1:"
      OPEN a$ FOR OUTPUT AS #1

   As a result, the overhead necessary to support data communications
   will be automatically included in the executable program. In the
   above example, your EXE file size will be reduced by approximately
   4K if you compile with BC /O (stand-alone option) and link using
   the following LINK command:

      BC yourprog.BAS/O;
      LINK yourprog.OBJ+NOCOM.OBJ;

   However, if your program does not contain any OPEN statements, or
   if the OPEN statements do not contain string variables as shown in
   the above example, the compiler will recognize that the program
   does not contain any data communications routines. Subsequently,
   none of the data communications support will be automatically
   attached to the program. In most cases, you do not need to link to
   the file NOCOM.OBJ.

   Thank you

   Microsoft Technical Support

Additional reference words: QuickBas softlib

KBCategory: kbprg kbfile
KBSubcategory:
Keywords : kbfile kbprg
Version : 4.50
Platform : MS-DOS


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.

Last reviewed: September 25, 1997
©1997 Microsoft Corporation. All rights reserved. Legal Notices.