On 10/30/2013 7:06 AM, Bertho Stultiens wrote: > The loops and conditionals provided by G-code are, well, archaic. The > format is context-sensitive and uses line numbers to keep track. Moving > things around in a G-code program is a pain. > > The reason for a context-free grammar is to make coding more flexible > without having to think about line numbers. A paradigm that has proven > to be very successful.
That's why with languages which use line numbers, it's advisable to space them apart, if the language allows, so that additions can be slipped in without having to renumber the whole program. IIRC the usual practice with BASIC was to number lines by 10's. Such a language should also have a utility to automatically renumber a program, tracing through all jumps, loops and branches to ensure it's all right, and trapping any errors from jumps, loops and branches to non-existent line numbers. Once achieving a state where all of a program works, it's a good idea to do a renumber then continue work on a copy. If G-Code cannot handle gaps in its line numbers, then perhaps an editor could do so, then have a Save As runnable output function which automatically renumbers with a step of one and another option to save the editing version with the gaps? ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users