OAR

RTEMS GNU Tools On-Line Library


labs

PREV UP NEXT Bookshelf

1.16: labs---long integer absolute value

Synopsis

#include <stdlib.h>
long labs(long i);

Description
labs returns the absolute value of i (also called the magnitude of i). That is, if i is negative, the result is the opposite of i, but if i is nonnegative the result is i.

The similar function abs uses and returns int rather than long values.


Returns
The result is a nonnegative long integer.


Portability
labs is ANSI.

No supporting OS subroutine calls are required.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.