SW500007 Microchip Technology, SW500007 Datasheet - Page 233

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
Library Functions
LDIV
Synopsis
Description
The ldiv() routine divides the numerator by the denominator, computing the quotient and the remain-
der. The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is
the largest integer which is less than the absolute value of the mathematical quotient.
the members of the returned structure are all of type long int.
Example
See Also
div()
Return Value
Returns a structure of type ldiv_t
The ldiv() function is similar to the div() function, the difference being that the arguments and
#include <stdlib.h>
ldiv_t ldiv (long number, long denom)
#include <stdlib.h>
#include <stdio.h>
void
main (void)
{
}
ldiv_t lt;
lt = ldiv(1234567, 12345);
printf("Quotient = %ld, remainder = %ld\n", lt.quot, lt.rem);
219

Related parts for SW500007