Kbase 17996: How to Call WIN32 API Function: Cos (Cosine)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/07/1998 |
|
How to Call WIN32 API Function: Cos (Cosine)
DISCLAIMER:
===========
The code example in this knowledgebase is for informational purposes
only. If you have specific questions about which API calls would be
best suited to your design goals, please consult your Microsoft
documentation.
INTRODUCTION:
=============
The following sample code shows how to call the Win32 trigonometric
function called Cos which resides in the Microsoft Visual C++ runtime
library called MSVCRT40.DLL. This function returns the cosine of an
angle in radians.
This code has been tested on Windows NT 4.0 Workstation only.
DEFINE VARIABLE decResult AS DECIMAL NO-UNDO.
PROCEDURE cos EXTERNAL "MSVCRT40.DLL" CDECL:
DEFINE INPUT PARAMETER dblValue AS DOUBLE NO-UNDO.
DEFINE RETURN PARAMETER dblResult AS DOUBLE NO-UNDO.
END PROCEDURE.
RUN cos (INPUT 75.655, OUTPUT decResult).
MESSAGE "The Cosine of 75.655 is " decResult VIEW-AS ALERT-BOX.