Post Reply 
Bug implementing infinite Recursion?
01-04-2018, 05:08 PM
Post: #5
RE: Bug implementing infinite Recursion?
(01-04-2018 04:43 PM)Tim Wessman Wrote:  How would one be able to know if the recursion was intended a) and infinite b)...?

(A) one should note the reference to the code being a code fragment and compare the routine with the corrected code in my List V1.2 program... I didn't mention it just to plug my new program Smile
The corrected code in V1.2 returns a count, and has no recursion.

The code fragment seems to call itself instead and has no obvious terminating condition...
Or am I missing something. Which in my working code would be unintended, though intended here in the interests of intending to show that the recursion is finite and the code continues to execute.
When in the full program, all the calls in ListExamples V1.2 execute after the infinitely finite recursion executes.

(B) The fact that my code prints SLOW and then the input list and then D suggests that on the Android, at least, the recursion is not infinite but is quite deep.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Bug implementing infinite Recursion? - StephenG1CMZ - 01-04-2018 05:08 PM



User(s) browsing this thread: 1 Guest(s)