1 //Same as the previous test but object is not optional
2 //for task two. Implies multiple entering flags
3 // (tricky part we spoke about, Brian and William)
5 task Startup(StartupObject s {initialstate}){
7 Test o = new Test() {A};
9 taskexit(s {!initialstate});
15 System.printString("Inside ONE\n");
16 int i = 100/o.getNumber();
22 System.printString("Inside TWO\n");
23 if(false) taskexit(o {!B, C});
24 else taskexit(o {!B, D});
28 /*task THREE(Test o{B}){
34 System.printString("Inside FOUR\n");
40 task FIVE(optional Test o{D}){
41 System.printString("Inside FIVE\n");
47 System.printString("Inside SIX\n");
48 taskexit(o {!E, G, J});
52 task SEVEN(optional Test o{F}){
53 System.printString("Inside SEVEN\n");
54 taskexit(o {!F, G, K});
58 task EIGHT(optional Test o{G}){
59 System.printString("Inside EIGHT\n");
61 if(false) taskexit(o {!G, H});
62 else taskexit(o {!G, I});
66 task NINE(optional Test o{H}){
67 System.printString("Inside NINE\n");
70 task TEN(optional Test o{I}){
71 System.printString("Inside TEN\n");
72 if(true) taskexit(o {!I,L });
73 else taskexit(o {!I,M });