// Commentary: // // This model demonstrates an integer state variable going out of range. // // Code: interface icount { in void up(); in void down(); behavior { on up: {} on down: {} } } component range { provides icount count; behavior { subint Range {0..10}; Range i = 5; on count.up(): i = i + 1; on count.down(): i = i - 1; } }