B4J Question IF -then - end if

kris_audi

Member
Licensed User
Longtime User
Hi

The mistake appears after starting compilation.

If Indeks = -1 Then Parity = 0
End If

Error parsing program.
Error description: Missing Keyword: end sub

There is no mistake in this case.

If Indeks = -1 Then
Parity = 0
End If
 

MaFu

Well-Known Member
Licensed User
Longtime User
If head and body are on the same line you don't need a End If statement.

This is right:
B4X:
If Indeks = -1 Then Parity = 0

If Indeks = -1 Then
    Parity = 0
End If

This is wrong:
B4X:
If Indeks = -1 Then Parity = 0
End If
 
Upvote 0
Top