A stupid question about code structure

basil99

Active Member
Licensed User
Longtime User
Hi !

Have this code N 1:

B4X:
Sub Activity_Create(FirstTime As Boolean)

If FirstTime Then

   Activity first time code here

end if

end sub


and this code N 2:

B4X:
Sub Activity_Create(FirstTime As Boolean)

If FirstTime Then

   PrepareCode


end if

end sub

sub PrepareCode

   Activity first time code here

end sub

So, question is - any significant difference ? What is better to use ? Any hidden problems with code 1 or 2 ?

Thanks
 

Cableguy

Expert
Licensed User
Longtime User
There is no major difference... in fact, using N2 you can more easily change code and keep track of changes...
 
Upvote 0
Top