⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.doc

📁 Dos6.0
💻 DOC
📖 第 1 页 / 共 2 页
字号:

                               README.DOC File

             Release Notes for the Microsoft(R) C Professional
                      Development System, Version 6.0

                  (C) Copyright Microsoft Corporation, 1990
                                          
     This document contains release notes for version 6.0 of the
     Microsoft C Professional Development System and libraries for
     MS-DOS(R) and the Microsoft Operating System/2 (MS(R) OS/2). The
     information in this document and in the Microsoft Advisor (on-line
     help) is more up to date than that in the manuals.
  
     Microsoft improves its languages documentation at the time of
     reprinting, so some of the information in this file may already be
     included in your manuals.



================================< Contents >================================

  
     This file has ll parts:
  
               Part     Note
               ----     ----
               1        SETUP Program Notes

               2        Differences between C 5.1 and 6.0

               3        Compiler and C Language Notes

               4        Programmer's WorkBench (PWB) Notes

               5        CodeView and Utilities Notes

               6        Getting Help on Start-Up Error Messages

               7        Notes on "Installing and Using"

               8        Notes on "C Reference"

               9        Notes on "Advanced Programming Techniques"

               10       Notes on Patching the MOUCALLS.DLL Dynamic-
                        Link Library (OS/2 1.1 Only)

               11       HIMEM, RAMDRIVE, and SMARTDRV



=======================< Part 1: SETUP Program Notes >=======================


     Installation Program Notes
     --------------------------

        - If you are already running QuickHelp as a keyboard monitor
          under OS/2, disable it before running SETUP so it can copy
          new versions of QuickHelp and MSHELP.DLL to your hard disk.



===============< Part 2: Differences between C 5.1 and 6.0 >=================


     For a complete discussion of the differences between Microsoft C
     versions 5.1 and 6.0, see Appendix B of "Advanced Programming
     Techniques."


     Functions Declared as Float
     ---------------------------

     In Microsoft C 5.1, functions declared as float always return a
     result of type double. In C 6.0, functions declared as float
     return a value of type float for ANSI compliance. This difference
     will cause compatibility problems when linking C 6.0 objects with
     C 5.1 objects and libraries that contain functions that return
     values of type float.

     To remedy the problem, prototype each function in your C 5.1
     libraries that returns type float as type double in your C 6.0
     source code. Then compile with C 6.0. For example:

          double func_in_51_lib( float );


     The sizeof Function Return Value
     --------------------------------

     To comply with ANSI specifications, the sizeof function now
     returns an unsigned int rather than an int. This may cause
     problems in statements of the following form:

          -sizeof( expression )

     For example, the following line of code, used to position
     a file pointer one record from the end, no longer works:

          fseek( file, (long)(-sizeof( record )), SEEK_END );

     Because sizeof returns an unsigned int, the record size is
     zero-extended to a long value rather than sign-extended to the
     appropriate signed value.

     To avoid this problem, you can cast the record size to a
     long before you negate it, as follows:

          fseek( file, -((long)sizeof( record )), SEEK_END );


     Arithmetic Operations on Signed Short Values
     --------------------------------------------

     In C 5.1 and Microsoft QuickC(R) 2.0, arithmetic on constants of
     type signed short is done using a signed long value. C 6.0
     conforms to the ANSI specification by performing arithmetic
     operations on signed shorts and yielding a signed short value.

     This causes overflow in some instances of constant arithmetic,
     most noticeably, multiplication. For example, when interpreted
     as a signed short, 48*1000 results in a value of -15232 rather
     than 48000.


     Hexadecimal Constants in Strings
     --------------------------------

     Hexadecimal escape sequences in strings now conform to the ANSI
     specification by treating every potential hexadecimal digit
     following the \x as part of the constant. In C 5.1 and QuickC 2.0,
     hexadecimal escape sequences are limited to three characters.

     Typically, you will notice this when using hexadecimal escape
     sequences for length-preceded strings. Consider the following
     example:

          char TypeArray[] =
              "\x005float\x006double";

     In C 5.1 and QuickC 2.0, TypeArray contains the following bytes:

          <5>float<6>double<0>

     In C 6.0, TypeArray has the following bytes:

          _loatmouble<0>

     This is because in C 6.0, \x005f and \x006d are legal hexadecimal
     sequences that represent the underscore and 'm' characters,
     respectively.

     There are two ways to avoid this problem. The simplest is to
     use string concatenation, as follows:

          char TypeArray[] =
              "\x005"  "float"  "\x006"  "double";

     According to the ANSI standard, adjacent string literals are
     concatenated after escape sequences have been calculated.

     A second solution is to use octal, which can never be more than
     three digits. The use of octal requires a small calculation and
     also requires that you pad out the digits with zeros on the left
     if necessary. However, even older, non-ANSI compilers will support
     this solution if portability is a concern.


     The offsetof Macro
     ------------------

     The offsetof macro (defined in STDDEF.H) takes a struct type
     name and member name, and returns a type size_t value giving the
     offset in bytes of the member from the beginning of the struct.

     The expression

          offsetof( type, member_name )

     yields the byte offset of the member from the beginning of the
     struct.

     Loop Optimization (/Ol)
     -----------------------

     The loop optimization option (/Ol) in C 6.0 has a different effect
     than in C 5.1. To get the equivalent of the C 5.1 /Ol option
     in C 6.0, use /Ole (loop code optimization and global register
     optimization). See Chapter 1 of "Advanced Programming Techniques"
     and on-line help for further details.



=================< Part 3: Compiler and C Language Notes >===================

     Compiler notes:

        - The CL and LINK environment variables work just as in
          previous versions of Microsoft C. The contents of the
          environment variable are interpreted as a series of command-
          line options for the associated utility. Note, however, that
          the use of these environment variables can cause
          unpredictable build behavior under the Programmer's WorkBench
          (PWB).

        - The CL command line can be used to specify the name of
          an OS/2 or Microsoft Windows(TM) module-definition file to be
          used by the linker. For example,

               CL CLOCK.C CLOCK.DEF

          tells CL to pass the name of the module-definition file
          'CLOCK.DEF' to the linker after compiling.

        - The /Gm compiler option, as described in the "C Reference"
          and in on-line help, is no longer supported by C 6.0.
          The /Gm option placed near const items in the CONST segment.

        - When using the /qc and /Zr options together, specify them
          in the following order on the command line:

               /qc /Zr

        - Using the setjmp and longjmp functions with global
          optimization options /Ox, /Oe, /Ol, or /Og can cause
          incorrect code to be generated. To ensure that the compiler
          generates correct code, either compile without these
          options, or use the optimize pragma to turn off /Oe, /Ol,
          and /Og in functions containing setjmp and longjmp, as

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -