Example 8
---------
"C" provides a conditional expression.
Thus if "a" and "b" are integer vari-
ables,
(a > b ? a : b)
is an expression whose value is that of
the larger of "a" and "b".
However this does not work if "a" and
"b" are to be regarded as unsigned
integers. Hence there is a use for the
procedure
6326 max (a, b)
char *a, *b;
{
if (a > b)
return(a);
return(b);
}
The trick here is that "a" and "b",
having been declared as pointers to
characters are treated for comparison
purposes as unsigned integers.