Kbase 18116: How to Call WIN32 API Function: Tan (Tangent)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/28/2005 |
|
Solution ID: 18116
GOAL:
How to Call WIN32 API Function: Tan (Tangent)
FACT(s) (Environment):
Windows 32 Intel
FACT(s) (Environment):
Windows NT 32 Intel/Windows 2000
FIX:
The following sample code shows how to call the Win32 trigonometric function called Tan which resides in the Microsoft Visual C++ runtime library called MSVCRT40.DLL. This function returns the tangent of a given number (angle) in radians.
DEFINE VARIABLE decResult AS DECIMAL NO-UNDO.
PROCEDURE tan EXTERNAL "MSVCRT40.DLL" CDECL:
DEFINE INPUT PARAMETER dblValue AS DOUBLE NO-UNDO.
DEFINE RETURN PARAMETER dblResult AS DOUBLE NO-UNDO.
END PROCEDURE.
RUN tan (INPUT 0.655, OUTPUT decResult).
MESSAGE "The Tangent of 0.655 is " decResult VIEW-AS ALERT-BOX.