I'm programming the Eight-Queen-Problem in NAV. I create a form, shapes to represent the chessboard and textboxes for the queens with a "Q"-textconstant (for Queen) as sourceexpression for the textboxes.
With a recursive function i set e.g. the first solution in an array. The calculation is correct, the right queens are shown after the calculation.
BUT: I will set the queens during the calculation. I will make visible how backtracking works, make the calculation visible, make visible how the program set and remove queens. When i e.g. call from the recursive mainfunction a function that do showing the queens:
CurrForm.queen_23.VISIBLE(x[2] = 3);
CurrForm.queen_23.UPDATE;
...
When the expression is True, then the "queen_23" will appear on the chessboard cause the UPDATE on textbox. BUT WHEN THE VISIBLE STATEMENT IS FALSE, the program has to remove the queen, but this doesen't works.Why Not? Is this a problem of a recursive function that calls a function?
Thanks for Feedbacks.
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.