PureBasic to Xojo

The backslash means “perform integer division”.

Yes, but I think that caused the problem.
After I replaced it, the result is as expected.