I hadn't tested because I don't have a B4A in this machine, but did you tried using IntRC as Long? Is seems to be a problem related to 32 and 64 bit numbers. Being Int 32bit, Double 64bit for double precision floating point, and Long for 64bit integer numbers.