Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i'm deep in a bunch of if clauses and a couple of for loops and my test detect a condition where i need to set up the dictionary to be returned then return. it's kind of like error handling or resource cleanup. there are too many variables it needs to make that setup code be another function. maybe i can wrap this in a big try/except.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
Jul-10-2020, 12:49 AM
(This post was last modified: Jul-10-2020, 12:58 AM by Skaperen.)
yes, it is complicated. it has been refactored twice. it was a major disaster on the first coding. this section probably can be refactored better than before.
(Jul-09-2020, 07:16 AM)Gribouillis Wrote: Is there a question?
no. does there need to be to make a discussion in a discussion subforum?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
not that i am suggesting it but just saying i hit a case where i'd have coded a goto. it would be a downward goto, only. my rule about using them in C is downward only. that way simpler code analysis algorithms can still work. that was the original complaint about them in FORTRAN.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
what exception would you suggest to use to do a downward goto that would not mess up the usual exception handling by the caller?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.