Bug implementing infinite Recursion?
|
01-04-2018, 04:40 PM
(This post was last modified: 01-04-2018 04:45 PM by StephenG1CMZ.)
Post: #1
|
|||
|
|||
Bug implementing infinite Recursion?
I unintentionally implemented an infinite recursion of a function taking a list which should return a real integer (the number of items counter in the list).
The infinite recursion behaved unexpectedly. The Prime only limits recursion depth in the CAS. But instead of crashing, the code that should never return an integer, instead returns tthe input list and continues to execute (after several seconds). Code:
Instead of printing C and erroring, the code fragment prints C {Input list} D At the point where D is printed, the count contains a list instead of an integer, which could lead to subsequent bugs in the user code...It would be better if the recursion were trapped and subsequent code not executed. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Bug implementing infinite Recursion? - StephenG1CMZ - 01-04-2018 04:40 PM
RE: Bug implementing infinite Recursion? - Tim Wessman - 01-04-2018, 04:43 PM
RE: Bug implementing infinite Recursion? - Dave Britten - 01-04-2018, 04:49 PM
RE: Bug implementing infinite Recursion? - StephenG1CMZ - 01-04-2018, 05:08 PM
RE: Bug implementing infinite Recursion? - Tim Wessman - 01-04-2018, 05:06 PM
RE: Bug implementing infinite Recursion? - StephenG1CMZ - 01-04-2018, 07:05 PM
RE: Bug implementing infinite Recursion? - TheKaneB - 01-04-2018, 05:12 PM
|
User(s) browsing this thread: 1 Guest(s)