|
From: Ethan A M. <merritt@u.washington.edu> - 2008-10-21 15:50:32
|
On Tuesday 21 October 2008, Juergen Wieferink wrote: > Hi, > > I would like to expand the iteration feature to the evaluate command > as I think this would be very useful. I have attached a first naive > but generally working patch. The problem is that the iteration is > not compatible to recursion. Can it be fixed? Is it worth the > effort? IMHO a simple recursion detection would suffice. I don't > see how to implement this right now in a way that still works after > an int_error(), though. > > My use case: I have some more or less generic scripts with a > differing number of values d0, d1, ... As I have to construct the > command line I'm stuck to the evaluate command. I cannot even put > the iteration into a set command within the evaluated string. I'm afraid I don't follow that explaination of intended use. Could you give an example of how you would use this? > BTW: AFAICS an int_error() leads to leakage right now as > check_for_iteration() simply discards (iteration_udv = NULL; ...) > instead of doing the correct deallocation. I could be wrong, but I don't think there is a leak. The udvs are all kept in one linked list. Setting iteration_udv = NULL doesn't remove the udv from the list. It is still accessible by name and will continue to be handled like any other defined user variable. -- Ethan A Merritt |