 | Cx51 User's Guide |  |
|
|
| cabs| Summary |
#include <math.h>
char cabs (
char val); /* number to take absolute value of */
| | Description | The cabs function determines the absolute value of the character val. | | Return Value | The cabs function returns the absolute value of val. | | See Also | abs, fabs, labs | | Example |
#include <math.h>
#include <stdio.h> /* for printf */
void tst_cabs (void) {
char x;
char y;
x = -23;
y = cabs (x);
printf ("CABS(%bd) = %bd\n", x, y);
}
|
|
|