in basic, is there a good way to tell if one variable is evenly divisible by another? i vaguely remember there being someing, but i can’t quite get it.
hell, it took me 45 mins of syntax errors and bad file number etc to rediscover pset…
anyway, i was thinking of something like taking the quotient, and doing something like func(quotient)=x, where func is some command which takes the closest whole number, and if quotient = x then all is sweet?
For instance x % y should return the remainder of x / y.
Or if ( (x%y) == 0) then it is evenly divisible. Modulus is an integer operation at the CPU as is very fast. Much faster than any routines that use floating point routines (division).