/* Test modulo operator in when expressions */ /* Test basic modulo */ test1 : 15 % 3; ..out test1; /* Test modulo in when expression */ test2 : when 15 % 3 is 0 then "divisible by 3" _ then "not divisible by 3"; ..out test2; /* Test multiple values in when expression */ test3 : when 15 % 3 15 % 5 is 0 0 then "divisible by both" 0 _ then "divisible by 3 only" _ 0 then "divisible by 5 only" _ _ then "divisible by neither"; ..out test3; /* Test modulo with equals function in when expression */ test4 : when equals (15 % 3) 0 equals (15 % 5) 0 is true true then "divisible by both" true false then "divisible by 3 only" false true then "divisible by 5 only" false false then "divisible by neither"; ..out test4;