home *** CD-ROM | disk | FTP | other *** search
- /*-----------------------------------------------------------------------*
- * filename - labs.c
- *
- * function(s)
- * labs - gives long absolute value
- *-----------------------------------------------------------------------*/
-
- /*[]------------------------------------------------------------[]*/
- /*| |*/
- /*| Turbo C Run Time Library - Version 3.0 |*/
- /*| |*/
- /*| |*/
- /*| Copyright (c) 1987,1988,1990 by Borland International |*/
- /*| All Rights Reserved. |*/
- /*| |*/
- /*[]------------------------------------------------------------[]*/
-
- #include <stdlib.h>
-
- /*---------------------------------------------------------------------*
-
- Name labs - gives long absolute value
-
- Usage long labs(long n);
-
- Prototype in stdlib.h
-
- Description calculates the absolute value of n, a long integer.
-
- Return value the absolute value of n.
-
- *---------------------------------------------------------------------*/
- long labs(long n)
- {
- return(n < 0 ? -n : n);
- }
-