Ray,

Thanks for your comments.

Someone else pointed out a problem with the brackets -- there is an
ambiguous case of #[sqrt[1.0]]. More precisely, it would require more
lookahead than I'd like.  I really don't want to rewrite the entire parser.

There is a need for some delimeter though. Consider the case:
"X#abc Y2" We need a delimeter to terminate the string abc. A space can't do
the job (easily) because the language (and the interpreter) remove white
space.

At this point, I'm considering use a "$" character as a string terminator.
So, this would be written "X#abc$ Y2". There seems to be some demand for
global named parameters. One approach I'm thinking of is as follows:

Variable names that are specified with a leading "$" would be local
variables. Variables without the leading "$" would be global variables.

So...
#abc$ would refer to a global variable
#$abc$ would refer to a local variable
Initially, neither local nor global variables would be saved in var files.
In the longer run, we might make the changes necessary to save global
variables.

The scope of local variables would be limited to the invocation of the main
or subroutine it was enclosed in. Subroutines called at deeper levels have
access only to those at their level.

BTW: My plan (or intention -- plan might be too strong a word) is to also
implement named o-words.

Then Ofoobargag$ would be a named o-word. In that case, foobargag would be a
globally accessible o-word. O$foobargag would be an o-word of local scope.
It would be visible only within the subroutine (or main program) in which it
was defined. That would avoid name clashes caused by subroutines written by
multiple persons using the same names (or numbers).

I'll try to get this new stuff moved over to the wiki.

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


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ray
Henry
Sent: Thursday, December 28, 2006 12:25 PM
To: EMC developers
Subject: Re: [Emc-developers] Proposal For Named Parameters



Hi Ken

Thank you again for your systematic approach to making changes to the
interpreter and how we enter commands.  I do like the idea of named
variables -- I've use a lot of #1000 = 12 or whatever.  I don't see any
problem with replacing the number part of the parameter call with a
name.

#myloopincr = 12

or

y#myloopincr


Why do you feel that the named reference needs to be bracketed?

Ray



On Wed, 2006-12-27 at 13:13 -0500, Kenneth Lerman wrote:
> See: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Named_Parameters
> for my proposal.
>
> Those of you who have seem my previous proposal (for o-words) probably
know
> that I'm proposing something that:
>
> 1 -- I believe is useful
>
> 2 -- I believe is reasonable to implement
>
> 3 -- I am prepared to implement for incorporation into emc
>
> This proposed change will not break any existing gcode written for EMC.
> (Thanks, cradek, for asking that question).
>
> So...
>
> Your comments, suggestions, etc, are more than welcome. Make them soon,
> please. Please add suggestions to the page on the wiki and announce your
> comments on the developers list to remind me to look there.
>
> I view the wiki as a shared notebook. As far as I'm concerned, if it is
not
> in the wiki, it doesn't exist.
>
> 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
>


-------------------------------------------------------------------------
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

-------------------------------------------------------------------------
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

Reply via email to