Sub test1
Dim a,b,c As Int
Dim flg1, flg2 As Boolean
a = 10
b = 20
flg2 = True
If flg1 Then : a = 45 : b = 40 : flg1 = True : End If
If flg2 Then : a = 34 : b = 55 : flg2 = False : End If
End Sub
if i try to formats with ALT + F, i have this :
B4X:
Sub test1
Dim a,b,c As Int
Dim flg1, flg2 As Boolean
a = 10
b = 20
flg2 = True
If flg1 Then : a = 45 : b = 40 : flg1 = True : End If
If flg2 Then : a = 34 : b = 55 : flg2 = False : End If
End Sub
I don't recommend to write such code. The IDE discourages the usage of colons to create new statements. You will not get autocomplete, formatting and probably other editing features.
I remember some decades ago I programed on a HP 9836 computer with HP Basic.
This Basic accepted only one instruction per line,therefore no semi-colon.
Since that time, I have never used any.
Even this If xxx Then yyy was not allowed.