MODULE TShiftNeg; // SHIFT by a negative or oversized amount drops out-of-span bits and // must not fault (a wild word address was loaded before). Exit 42. TYPE BS = SET OF [0..15]; VAR b, e : BS; ExitCode : INTEGER; BEGIN b := SHIFT(BS{1, 2, 3}, -1); (* {0,1,2} *) e := SHIFT(BS{1, 2, 3}, 100); (* {} *) IF (b = BS{0, 1, 2}) AND (e = BS{}) THEN ExitCode := 42 ELSE ExitCode := 1 END END TShiftNeg.