This wish springs forth from these two threads:
www.b4x.com
www.b4x.com
It could be in the form of
5 DIV 3
or something like that. It would not break the backward compatibility of the existing way that B4X handles division (casting divisor to double) and yet provide an option for proper integer division for people that need the most speed from such (without casting back and forth between double and int) and for people that expect integer division by 0 to produce an exception.
How to do division of two Ints as integer division instead of floating point division?
Dim Temp As Int = NewX * 2 + 1 Dim Temp1 As Int = Temp * SrcWidth Dim Temp2 As Int = (NewWidth * 2) Temp = Temp1 / Temp2 decompiles to: int var23 = var21 * 2 + 1; int var24 = var23 * var17; int var25 = var1 * 2; int var10000 = (int)((double)var24 / (double)var25); Is there any way to get the...

[Solved 'ish]Division by Zero
I may be missing something, but it appears dividing by zero no longer generates an Exception. Dim a As Int = 99 Dim b As Int = 0 Dim c As Int = a/b Log(c) '

It could be in the form of
5 DIV 3
or something like that. It would not break the backward compatibility of the existing way that B4X handles division (casting divisor to double) and yet provide an option for proper integer division for people that need the most speed from such (without casting back and forth between double and int) and for people that expect integer division by 0 to produce an exception.