Lines Matching refs:state
84 int state;
96 state = 0;
105 switch(state) {
106 case 0: // initial state
107 cout << "In state 0 :: " << flush;
111 cout << "staying in state 0" << endl;
114 state = 1;
115 cout << "going to state 1" << endl;
120 state = 2;
121 cout << "going to state 2" << endl;
126 cout << "In state 1 :: " << flush;
129 state = 0;
130 cout << "going to state 0" << endl;
134 cout << "going to state 2" << endl;
135 state = 2;
140 cout << "staying in state 1" << endl;
144 cout << "In state 2 :: " << flush;
147 state = 0;
148 cout << "going to state 0" << endl;
152 cout << "going to state 1" << endl;
153 state = 1;
158 cout << "staying in state 2" << endl;
162 cout << "In bad state - resetting" << endl;
163 state = 0;