Simple math doing my head in - when is an int treated like an int?

result := map (potValue, 0, 1023, 0, 255) ;

Have we got our Pascal head on ? :wink: