73
edits
Changes
→Overloading
The primer covers procedures including overloading, argument intents and dynamic dispatch.
=== Overloading ===
The prime allows the user to do the overload function.
proc factorial(x: int) : int
{
if x < 0 then
halt("factorial -- Sorry, this is not the gamma procedure!");
return if x == 0 then 1 else x * factorial(x-1);
}
= Reference =