I'm a bit ashamed.
Tried to port the Euclidian algorithm (to calculate the greatest common divisor) to C2.
I'm failing on the "While" condition since the program freezes as soon as I call the function.
Apparently, I don't seem to really understand or use the "While" condition appropriately.
This is the Euclidian algorithm according to Wikipedia:
Pretty simple, huh? One would think, that's easily implementable.
This ismy current setup:
This causes a freeze for some reason.
Notes: each time the function is called, b is supposed to stay the same (9) and a is variable.
(And yes, I know that I could compress the code, but for overview's sake, I kept it like that)
Any ideas how I should use the "While" condition correctly and why it causes a freeze in its current state?