Writing a function

Follow-up: I just tried a template function at it works fine:

template <typename type>
type Maximum (type a, type b)
{
    return (a > b) ? a : b;
}

void setup()
{
    Serial.begin (9600);
}

void loop()
{
    delay(1000);
    Serial.println (Maximum(3,4));
}