Sorry: Pressing "Tab" in Gmail isn't a good plan…

On 11 September 2010 22:41, Andy Pugh <[email protected]> wrote:
> On 11 September 2010 22:06, Stuart Stevenson <[email protected]> wrote:
>
>>  what would the 'state-machine' code look like? I would be open to learning
>> and changing

switch(state) {
    case 0:
        if (A && B) {
          state = 1
        else {
           do some other stuff
        }
    case 1:
        if abort {
           state = 0
        }
       do some "state one" stuff
       if (finished) {
         state = 2
       }
    case 2:


….

And so on.
Each state corresponds to some phase of your tool change, and you can
move from state to state at will.
It seems a bit easier to follow than that very nested "if" you have.

-- 
atp

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to