[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


ldiv

Compute the long integer quotient and remainder.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <stdlib.h>
ldiv_t ldiv(long int numer, long int denom);
Parameters:

Parameters for this facility are:

numer  
long int  
The numerator  
denom  
long int  
The denominator  

Remarks:

The ldiv_t type is defined in stdlib.h as


  typedef struct {    long int quot, rem;
  } ldiv_t;
Return:

ldiv() divides denom into numer and returns the quotient and remainder as an ldiv_t type.

See Also:

"fmod"

"div"

"ldiv_t"

"lldiv_t"

For example of ldiv() usage:
Refer to "Example of div() usage." .


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000