Android Question Wish Code Beautify

Apip Bayok

Member
Hello everyone,

I work using B4A and write hundred line of code and sometime it's me make confused, for example:
[CODE lang="b4x" title="B4A IDE Default style"]Sub exm(a As Int,v As Boolean)
If a<>0 Then
Log("this a="&a)
Else
If v=True Then
Log(v)
Else
Log("this is example")
End If
End If
End Sub
Private Sub example(a As Int)
If a=1 Then
Else If a=2 Then
else if a=3 Then
Else
End If
End Sub[/CODE]

[CODE lang="b4x" title="Wish be could like this"]Sub exm(a As Int,v As Boolean)
If a<>0 Then
Log("this a="&a)
Else
If v=True Then
Log(v)
Else
Log("this is example")
End If
End If
End Sub

Private Sub example(a As Int)
If a=1 Then

Else If a=2 Then

else if a=3 Then

Else

End If
End Sub[/CODE]

is there a way to make it prettier with some shortcut or feature?
 
Have you tried Auto Format?

1643185056944.png
 
Upvote 0
I want to suggest you to use a Select case instead a lots of If ElseIf Else and your code may results more readable.
 
Upvote 0
Back
Top