This code:
Generates this output.
Diff1 is:999999000
Diff2 is:1999998000
Diff3 is:-1294970296
Diff4 is:-2147483648
B4X:
Dim Diff1 As Long = (999999 * 1000)
Log ("Diff1 is:" & Diff1)
Dim Diff2 As Long = (999999 * 2000)
Log ("Diff2 is:" & Diff2)
Dim Diff3 As Long = (999999 * 3000)
Log ("Diff3 is:" & Diff3)
Dim Diff4 As Long = 2147483647 + 1
Log ("Diff4 is:" & Diff4)
Generates this output.
Diff1 is:999999000
Diff2 is:1999998000
Diff3 is:-1294970296
Diff4 is:-2147483648