CodeView (cv.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
C Function Calls
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     C expressions can contain calls to functions that are part of the
     program being debugged. However, the C expression evaluator treats
     a function call as if the function has no prototype. Thus, if an
     argument type in a function call differs from the corresponding
     parameter type in the function prototype, you must explicitly cast
     the argument to the type given in the prototype. Otherwise, the
     function call returns a meaningless result.
 
     For example, if the program you are debugging has the definitions
 
          int _far *far_ptr;
          int func( int _near *near_ptr)
          {
              return(near_ptr);
          }
 
     then using the call
 
          func( far_ptr )
 
     in an expression returns an unpredictable result. To achieve
     the intended result, you must explicitly cast far_ptr, as in
 
          func( (_near *)far_ptr )
 
     NOTE: Functions that return floating-point values must be compiled
           with Microsoft C version 6.0 or later. CodeView cannot
           correctly evaluate floating-point functions that were
           compiled with earlier versions of Microsoft C.
                                    -♦-