Open main menu
CDOT Wiki
β
Search
Changes
← Older edit
Newer edit →
GPU621/The Chapel Programming Language
130 bytes removed
,
13:40, 20 November 2020
→
Procedures:
A procedure is like a function in C++ that can be used or called inside the program.
proc
factorial
plus
(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
)
;
}
Jackien
25
edits