Most functions return either a string or a numeric value, and can thus be used anywhere an expression is expected.
Most functions also set the value of @ERROR, which allows you to check whether the function was successful.