Apip Bayok Member Jan 26, 2022 #1 Hello everyone, I work using B4A and write hundred line of code and sometime it's me make confused, for example: Code: 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: 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 is there a way to make it prettier with some shortcut or feature?
Hello everyone, I work using B4A and write hundred line of code and sometime it's me make confused, for example: Code: 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: 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 is there a way to make it prettier with some shortcut or feature?
max123 Well-Known Member Licensed User Longtime User Jan 26, 2022 #3 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
I want to suggest you to use a Select case instead a lots of If ElseIf Else and your code may results more readable.
I Ivica Golubovic Active Member Licensed User Longtime User Jan 26, 2022 #4 Right mouse click on Sub code area and "Auto Format". Upvote 0
Apip Bayok Member Jan 27, 2022 #5 Thank you all for Ur suggest & information, I didn't know that tool is exist, very helpful Upvote 0