[AccessD] Weekend fun: Primes

Stuart McLachlan stuart at lexacorp.com.pg
Fri Dec 9 17:03:01 CST 2005


On 9 Dec 2005 at 21:14, Mark A Matte wrote:

> Gustav,
> 
> For whatever reason your email inspired me to look at primes...and I wrote a
> module in A2k that would determine if a number was prime or not...it seems
> to work fine...until I get to the number 2,147,483,647  .  I'm using the MOD
> function in the module...and it apparently cannot handle a number larger
> than this in VBA...I get an "OVERFLOW" error.  Any ideas?
> 

Pop quiz!

What's the largest number that can be stored as a long ( signed 32 bit)?



-- 
Stuart





More information about the AccessD mailing list