Mod[x,y] producing odd output

I’m running Mod[1, index]

The index is an int, so it should naturally return 0 or 1.

input > 0, 1, 2, 3, 4, 5

output > 0, 1, 1, 1, 1, 1

var ColumnMult : int = 0;
if(set ColumnMult = Mod[1, index]) {}

If someone could explain why this is happening I’d be much obliged.
My solution was in fact Mod[index, 2] to get the desired results. I had forgotten modulo math.

From what I see that output looks correct. I believe what is happening is this is integer modulos therefor 1 / Y:int = 0 with R1.

[Edit]

# Fails if `Y=0`.
    Mod<native><public>(X:int, Y:int)<computes><decides>:int