On 2/7/2013 3:06 PM, EBo wrote: > On Feb 7 2013 10:35 AM, andy pugh wrote: >> On 7 February 2013 19:21, Michael Haberler <[email protected]> >> wrote: >>> The question would be rather: "what does it mean to have a HAL >>> string object", for instance 'linking to a string signal', and >>> 'updating a string signal'. >> Thinking about this a little more, I am not sure I need string pins, >> but string parameters would be nice. >> >> The idea above of passing a string to be engraved into G-code is an >> interesting one, but string handling inside G-code sounds likely to >> be >> horrible. >> (And might be handled more G-code-ly by passing a parameter number >> that that contains the first character, and the number of characters, >> on two int pins...) > I do not think it will be that bad, BUT that all depends on how you go > about it... > > If you start by using programmable calculator program and associate > pins with multiple registers, then you basically have the ability to do > a LOT more than your (p1*p2)+p3 example. You also get logarithms, > exponents, etc... It may or may not be possible to distinguish a > variable type (such as boolean or float<analog>) and continue with the > arithmetic. Yes. Trig functions, logs, etc, would all be part of the "plan".
Ken > Also, if you really want to write an interpreter/generator take a look > at Spirit++ (part of the Boost distribution) which implements YACC and > LEX in a C++ template library and the code actually reads as clearly as > EBNF. It is truly elegant. Also, there are examples which implement > various calculators.... > > EBo -- > > > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
