I'll bet that even if you own PBP3 and a 18F series chip, the code Henrik posted, will be using less memory and will be much faster than using Long variables.

Ioannis