Kbase 20080: How to Call UNIX libm Function: Acos (Arccosine)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/1/2009 |
|
Status: Verified
GOAL:
How to Call UNIX libm Function: Acos (Arccosine)
FACT(s) (Environment):
Progress 9.x
UNIX
FIX:
The following sample code shows how to call the UNIX LIBM Trigonometric function called Acos that resides in the UNIX shared library /usr/lib/libm.1, or /usr/lib/libm.so. This function returns the hyperbolic arccosine of a number.
The sample code:
DEFINE VARIABLE decResult AS DECIMAL NO-UNDO.
PROCEDURE acos EXTERNAL "/usr/lib/libm.1" CDECL:
DEFINE INPUT PARAMETER dblValue AS DOUBLE NO-UNDO.
DEFINE RETURN PARAMETER dblResult AS DOUBLE NO-UNDO.
END PROCEDURE.
RUN acos (INPUT 0.655, OUTPUT decResult).
MESSAGE "The Arccosine of 0.655 is " decResult
VIEW-AS ALERT-BOX.