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.
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!