xdr_double()--Translate between Double-Precision and XDR


  Syntax
 #include <rpc/xdr.h>

 bool_t xdr_double(XDR *xdrs,
                  double *dp);

  Service Program Name: QZNFTRPC

  Default Public Authority: *USE

  Threadsafe: No

The xdr_double() function is a filter primitive that translates between C-language double-precision numbers and their external representations.


Parameters

xdrs  (Input) 
A pointer to the eXternal Data Representation (XDR) stream handle.

dp  (I/O) 
The address of the double-precision number.

Authorities

No authorization is required.


Return Value

TRUE (1) Successful
FALSE (0) Unsuccessful


Error Conditions

None.


Error Messages

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


Example

See Code disclaimer information for information pertaining to code examples.

The following example shows how xdr_double() is used:

#include <stdio.h>
#include <xdr.h>

typedef struct vector
{
        double x,y,z;
} vector ;

bool xdr_vector(XDR *xdrs, vector *p_vector)
{
        if(!xdr_double(xdrs,&(p_vector->x)))
                return FALSE;
        if(!xdr_double(xdrs,&(p_vector->y)))
                return FALSE;
        return xdr_double(xdrs,&(p_vector->z));
}


API introduced: V4R2
Top | Remote Procedure Call (RPC) APIs | APIs by category