Changes

Jump to: navigation, search

GPU621/Chapel

245 bytes added, 23:03, 29 November 2022
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 =
73
edits

Navigation menu