|
From: Bertho S. <be...@va...> - 2013-10-30 14:12:01
|
On 10/30/2013 02:53 PM, andy pugh wrote: > Getting a bit off topic here Well, if I cannot defend the choices made in the creation of gcmc, then they may not be valid choices and should be thought about. > , but the RS274NGC version of G-code doesn't use line-numbers at all. > While/Wend If/Endif are matched by numerical tags, so canbe moved > about (but can't be repeated unless you change their identifier > tags) > http://www.linuxcnc.org/docs/html/gcode/o-code.html What is more readable? o100 sub (notice that the if-endif block uses a different number) o110 if [#2 GT 5] (some code here) o110 endif (some more code here) o100 endsub ... or ... function blabla(arg1, arg2) { if(arg2 > 5) { /* Some code here */ } } > I have a feeling that a few years ago someone wrote a system to > allow use of something Python-like to create G-code, but I can't find > it. I vaguely remember seeing some python style attempt, but I have one *very* large objection to python: it is context-sensitive. IMO, it is brain-dead to use indenting for scoping purposes where context-free grammars have proven to be so useful over the years. But that is my opinion. -- Greetings Bertho (disclaimers are disclaimed) |