Fixed bad example code.

This commit is contained in:
Andrew Johnson
2007-01-24 22:05:16 +00:00
parent 5e4b2d03ad
commit 2d031c46a2

View File

@@ -1,28 +1,22 @@
program sncExample
double v;
assign v to "{user}:xxxExample";
assign v to "{user}:aiExample";
monitor v;
ss ss1
{
state low
{
when(v>5.0)
{
printf("changing to high\n");
} state high
when(delay(.1))
{
} state low
}
state high
{
when(v<=5.0)
{
printf("changing to low\n");
} state low
when(delay(.1))
{
} state high
}
ss ss1 {
state init {
when (delay(10)) {
printf("sncExample: Startup delay over\n");
} state low
}
state low {
when (v > 5.0) {
printf("sncExample: Changing to high\n");
} state high
}
state high {
when (v <= 5.0) {
printf("sncExample: Changing to low\n");
} state low
}
}