On Monday 13 July 2015 10:04:36 Erik Christiansen wrote: > On 13.07.15 10:29, Marcus Bowman wrote: > > Being basically lazy, I often assemble programs from skeletons, and > > add bits copied from text files or previously-saved code. I > > invariably forget to renumber REPEAT loop references, so I end up > > with more than one loop with the same reference number (like O500 > > REPEAT etc in 2 or 3 places) When I load the program, LinuxCNC gets > > stuck in an endless attempt to resolve the loop references. > > > > Is there a simple way to halt this? I can't find anything other than > > shutting down LinuxCNC, and its a pain. Is there a keystroke > > combination to force the program to stop? > > In the short term, would a few lines of awk, to scan the program for > that no-no, be useful? (Or forgotten in the rush to make swarf?) > It would be nearly as easy to have it change any repetition to another > number, and ensure that it is unique in the program.
It could be helpfull, but I find that my penchant for doing incrementals is often thwarted by using the wrong ge/gt/le/lt statement in a while test is an even bigger killer. I once left such a test loading overnight, thinking that it would have overflowed or wrapped by morning. No such luck and I regretfully hit the reset button and rebooted. My stupidity, yes. But it seems the scanner should detect that and upchuck with an error message calling attention to the stupidity. > In the longer term, what about tweaking the interpreter code to only > look forwards for the first matching "endrepeat"? Even if it builds a > set of pointers to all of them in an initial pass, that process could > readily save the first following match only, I figure. That way, the > Oxxx label could be freely re-used on non-nested "repeat" statements. > (Anyone using the same label on nested loops deserves whatever > happens, I suspect.) > > Erik Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users