Microsoft KB Archive/43694

Tips for Submitting Code Examples for Review PSS ID Number: Q43694 Article last modified on 09-11-1990 PSS database name: PSS

MS-DOS | MACINTOSH | OS/2

Summary:

It is often necessary to obtain a code example to determine the cause of a problem you are experiencing. This article outlines the information that will help Product Support determine the nature of the problem and provide a solution in the most expedient manner.

More Information:

When submitting code examples, please include the following information:

  Hardware Configuration   Make and model of computer   Amount of memory   Video configuration, including make and model of video adapter    Operating System and Version   System Configuration   Contents of CONFIG.SYS </li>  Contents of AUTOEXEC.BAT </li></ol> </li>  Brief Description of the Problem   The steps necessary to re-create the problem </li>  Product name and version number </li></ol> </li>  Expected Results Explain how the observed results differ from the expected results </li>  Code Sample   The code sample should be the smallest amount of code that still demonstrates the problem. Because you are the person most familiar with your code, it is most expedient for you to pull out the portion of code that will actually re-create the problem. </li>  The code sample should be self contained, i.e., does not require $INCLUDE or COPY files. </li>  The code should be complete, i.e., we should be able to reproduce the problem from compiling and LINKing the code you submit. </li>  Include the compiling switches used; for COBOL code, include the COBOL.DIR. </li>  Include the LINKer switches. </li></ol> </li></ol>

The following is an example of a complete code submission, following the suggested format above:

  Hardware Configuration Compaq 386/20 1 MB RAM IBM VGA card and monitor Microsoft Bus Mouse </li>  Operating System and Version Compaq DOS Version 3.31 </li> <li> Contents of AUTOEXEC.BAT and CONFIG.SYS AUTOEXEC.BAT set COBDIR=C: set LIB=C: path=C:;C:;C:;C:;C: prompt $p$ _$g mouse CONFIG.SYS files=20 buffers=20 device=c:.sys </li> <li> Brief Description of Problem QuickBASIC Version 4.50 The following program will give different results when executed in the QuickBASIC environment than it does as an executable file. In the environment, the printed values are correct. </li> <li> Expected Results As an .EXE file, the calculated value for PROFIT is 75555 when it should be 2500. </li> <li> Code Sample </li></ol>

DEFLNG A-Z REDIM Tr(1), Te(1) CLS Tr(1) = 10000: Te(1) = -7500 Profit = Tr(1) + Te(1) PRINT “profit should = 2500” PRINT Profit Profit = Tr(1) Profit = Profit + Te(1) PRINT “profit should = 2500” PRINT Profit

Complete Compile Information

BC PROG /O;

Complete Link Information

LINK PROG;

Copyright Microsoft Corporation 1990.