Consultor Eletrônico



Kbase 20081: How to Call UNIX libm Function: Asin (Arcsine)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/1/2009
Status: Unverified

GOAL:

How to Call UNIX libm Function: Asin (Arcsine)

FACT(s) (Environment):

UNIX
Progress 9.x

FIX:

The following sample code shows how to call the UNIX LIBM Trigonometric function called Asin that resides in the UNIX shared library /usr/lib/libm.1, or /usr/lib/libm.so. This function returns the hyperbolic arcsine of a number.

The sample code:

DEFINE VARIABLE decResult AS DECIMAL NO-UNDO.

PROCEDURE asin 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 asin (INPUT 0.655, OUTPUT decResult).

MESSAGE "The Arcsine of 0.655 is " decResult
VIEW-AS ALERT-BOX.