Paul,

You wrote:

 >Beware though that if you have enum items set {"da","moo"} and
 >supply a string "dada" or "mooable", no error is returned...

I handle this problem via the case structure's Default case.  With string
driven state machines, my default case is always "invalid case."  If a
string does not exactly match the state names, the structure executes the
default case ("invalid case") which generates an error and gives the
invalid string.  I find this very helpful for debugging as well.

With an enum-based machine, avoiding a Default case let's you know whether you've included all the desired cases at programming time. Everything's a tradeoff.


--
        EnWirementally,
        Paul F. Sullivan

----------------------------------------------------

        SULLutions              (781)769-6869
        "when a single discipline is not enough"

visit http://www.SULLutions.com

----------------------------------------------------




Reply via email to