EAGLE Help
Absolutwert-, Maximum- und Minimum-Funktion
-
Funktion
-
Absolutwert-, Maximum- und Minimum-Funktion.
-
Syntax
-
type abs(type x);
type max(type x, type y);
type min(type x, type y);
-
Rückgabewert
-
abs liefert den absoluten Wert von x.
max liefert das Maximum von x und y.
min liefert das Minimum von x und y.
Der Return-Typ dieser Funktionen ist identisch mit dem größeren Typ der Argumente.
type muß
char,
int oder
real sein.
Beispiel
real x = 2.567, y = 3.14;
printf("The maximum is %f\n", max(x, y));
Index
|
Copyright © 2005 CadSoft Computer GmbH
|