More about Integer division
I think they are confusing Mod with what some languages call Integer Division (Usually a \). It is the other half of Mod and just returns the division without fraction or remainder (And no rounding).
I used to program in Basic back in 1985, and The Apple][ Basic had both integers and floats. Nevertheless, The integer Basic (for Apple][) had only Integer division. Simple days! I was wondering if there is (going to be) integer division between 2 integers in Basic4Android, something like the \ operator, BECAUSE if you look into main.java file's fragment:
public static int _div(int _a,int _b) throws Exception{
int _c = 0;
//BA.debugLineNum = 3384;BA.debugLine="Sub div (a As Int, b As Int) As Int";
//BA.debugLineNum = 3385;BA.debugLine="Dim c As Int";
_c = 0;
//BA.debugLineNum = 3386;BA.debugLine="c = a / b";
_c = (int)(_a/(double)_b);
//BA.debugLineNum = 3387;BA.debugLine="Return c";
if (true) return _c;
//BA.debugLineNum = 3388;BA.debugLine="End Sub";
return 0;
}
, you will see the division between (note!) 2 integers is actually division of an integer to a DOUBLE !! WHY is that? Is it some kind of a must, that JAVA dictates?? I doubt this is any faster than simply divide intc = (int)(_a/_b); !!
Please, consider integer division between 2 integers. It should not be hard to implement.