Search found 3 matches
- Mon Aug 11, 2025 5:56 am
- Forum: Coding Questions
- Topic: Double recursion query
- Replies: 4
- Views: 215
Re: Double recursion query
Thanks for the detailed reply and explanation. Now I feel silly.
- Sun Aug 10, 2025 6:02 pm
- Forum: Coding Questions
- Topic: Double recursion query
- Replies: 4
- Views: 215
Re: Double recursion query
Can you try changing the fib call to:
See what happens then. For me I get the "compilation in progress" dialog then it closes. No output results.
Code: Select all
Debug fib(100)
- Sun Aug 10, 2025 11:57 am
- Forum: Coding Questions
- Topic: Double recursion query
- Replies: 4
- Views: 215
Double recursion query
This code (Fibonacci sequence) when run appears to get stuck. That is, no output occurs. Is it because of the double recursive call to the fib procedure?
Code: Select all
Procedure fib(n)
If n<=2
ProcedureReturn n
Else
ProcedureReturn (fib(n-2) + fib(n-1))
EndIf
EndProcedure
Debug fib(10)