From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-14-2013 06:35 AM
Hey,
I've a base class A, with abstract method DO().
Then derrivative class B, which contains array of A objects.
Now I've implemented DO() method, which need to recurse on each element of array. So I'm calling DO() method for each item.
I'm getting the error message, attemped to do recursive call.
What should I do?
Thanks.
09-14-2013 12:54 PM
09-14-2013 01:52 PM
Yeah man,
I've already done that. And yes, that is the solution.
And about recreating, I've tried to explain as simple, as possible. In a real, I'm doing much difficult architecture, using many OOP features, like polymorphism.
Thanks for advice, in all cases.
09-15-2013 11:55 AM
Hi,
There is nothing special about G# and recursion, since G# simply is a LabVIEW class and will follow all the rules regarding recursion as are allowed for LabVIEW classes. I've used a lot of G# recursion and never had any problem when setting the "shared clone" in the VI execution property just as Thomas mension above. You also must make sure you have a stop condition for the recursion and that usually causes the recursive call VI to be inside a case structure. I think that you can get a similar error if the LabVIEW compiler identifies a possible infinit recursive call.
Mattias
09-15-2013 12:15 PM
Thanks Mattias,
I'm not new in programming, and I know well about recursion, and it's basis.