QuoteThis work is in the public domain in the United States because it was published in the United States between 1929 and 1977, inclusive, without a copyright notice.
Quote from: Frank Brübach on May 13, 2024, 05:51:20 PMHello all 👋
Made Last days for me an important Update of HalPromentBasic ...
I have changed some functions and Keywords.. its running all on a 64-bit machine now too
Halpromide Editor Shows at the start a Photo of the Stanley Kubrick film 2001 space odyssee because the hal Name belongs to this movie
' -- recursive function, halProment
''-- a) Case (n = 0) : factorial(0) = 1
''-- b) Case (n > 0) : factorial(n) = n * factorial(n-1)
''-- b) this case calls the function itself: 'Return n * factorial(n - 1)
Function recursiveFactorial (ByVal n As Integer) As Integer
If n = 0 Then '' end condition
Return 1
Else '' recursion loop
Return n * recursiveFactorial(n - 1) '' recursive call
End If
End Function
Printy recursiveFactorial(4) ' 24
p? recursiveFactorial(6) ' 720
Page created in 0.156 seconds with 11 queries.