Mikroc, Ldiv, Labs – ABL electronic PIC Microcontrollers PIC16 User Manual

Page 301

Advertising
background image

MikroElektronika: Development tools - Books - Compilers

293

page

mikroC - C Compiler for Microchip PIC microcontrollers

mikroC

making it simple...

Prototype

ldiv_t ldiv(long numer, long denom);

Description

Function is similar to the

div

function, except that the arguments and the result struc-

ture members all have type

long

.

Function computes the result of the division of the numerator

numer

by the denominator

denom

; function returns a structure of type

div_t

comprising quotient (

quot

) and

remainder (

rem

).

ldiv

Prototype

long

labs(long num);

Description

Function returns the absolute (i.e. positive) value of a long integer

num

.

labs

Prototype

int

max(int a, int b);

Description

Function returns greater of the two integers,

a

and

b

.

max

Prototype

int

min(int a, int b);

Description

Function returns lower of the two integers,

a

and

b

.

min

Advertising
This manual is related to the following products: