class Example {
flag needoperation;
flag needprinting;
-
+ public Example() {}
+
+
int operation;
int x;
int y;
}
taskexit(s {!initialstate}); /* Turns initial state flag off, so this task won't refire */
+
}
/* Fails for x=1 */
task DoPrint(Example e{needprinting}) {
System.printInt(e.z);
- taskexit(e {!needprinting};
+ System.printString("\n");
+ taskexit(e {!needprinting});
}