Skip to content

issue with set constructor (range order)

If the order of the elements is in the range from largest to smallest, the set constructor produces an incorrect result.

MODULE TestSet1;
	PROCEDURE Do*;
	VAR s: SET;
	BEGIN
		s := { 13..7 };
		TRACE(s);
		s := { 7..13 };
		TRACE(s);
	END Do;
END TestSet1.

System.Free TestSet1~
TestSet1.Do~