I kept thinking of a “stop” condition rather than a “continue while” condition…
The other thing not working was my line:
int stop = @numprim;
…It's in a detail wrangle so it did not find the @numprim. I also tried using:
int stop = prim(0, "numprim", 0);
…but that gave me “0” instead of “2”. I still don't get that problem. So I ended up creating a primitive wrangle just before and using the setdetailattrib so my numprim would be in the detail attributes. From there, I was able to use that value.
So much troubleshooting for so little effect. Thanks for the help!
-Olivier