Please see: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?AlternativeNamedParameterSyntax
I've written this after a discussion on IRC last night (EST). Some comments (paraphrasing) that were made: 1 -- Why don't we just use a real language, instead? 2 -- All those '$' characters are confusing (see flowsnake.ngc in nc_files in HEAD for the example). 3 -- What is all this local and global scope stuff, and why do we need it? Some brief answers (or non-answers): 1 -- Anyone who wants to use a real language should feel free to do so. Languages are like... 2 -- I took part of this comment to mean that the '$' characters are ugly. Because they are so blocky, they catch the eye and make the code harder to read (for a human). I had originally wanted to use [] characters, but (someone else) noticed that #[sqrt[#1]] is legal syntax. That would have required more lookahead in the parser than is currently supported. The alternative uses <>, instead. 3 -- The idea of local scoping is that it should be possible to write a subroutine and chose the parameters it uses without reference to other subroutines written by other people. It is possible to write a subroutine that has an argument passed to it that identifies another subroutine. Also, it is possible to write recursive subroutines. See the flowsnake.ngc example. That would be hard to write without local parameters. (Of course, some might say, why bother.) At any rate, in general, users should be able to just use local variables. If you should have used a global variable (say to return a value from a subroutine), you will get an error that the variable wasn't defined. As always, comments are requested or (if it does any good) comments are demanded. The previous round of comments has lead to this new proposal which, I believe, is better than the original. [Of course, I have to go back and rewrite some of the code; but that's the breaks. :-)] Regards, Ken [EMAIL PROTECTED] Mark Kenny Products Company, LLC 55 Main Street Voice: (203)426-7166 Newtown, CT 06470 Fax: (203)426-9138 http://www.MarkKenny.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers