As I am getting used to Basic4Android I have to say I love it. There are a couple of things I would like to ask about and possiblly get implimented in a future release...
Subroutines - right now as I understand it I can use a SUB as either a Function or Subroutine. I can opt to have it return a value or not. While this is great I also note that I can get confused easily if I happen to be doing other things for a while and then come back to my B4A project.
My first suggection is to offer that for a SUB the 'Call' statement can be optional. So for example. If you were calling a Subroutine you called 'mySub' in code you would see:
Call mySub
This would immediately tell you that you are calling a Subroutine. As code becomes more complex having the option of placing 'Call' before the Sub would make things much more clear for the developer.
One other possible suggestion I have is to have Subs broken down into Functions and Subroutines (Func/Sub).
Functions indicate that a special type of sub will be used in a formula and may have a return value (as subs do now in B4A).
A Subroutine would not return a value. It is called and actions are performed.
While subs now work well if a Developer works on several different types of projects (VB.NET, C#, Java, etc.) and then comes back to B4A wanting to make a change in code having the disctinction of Sub and Funct make re-aclimating yourself easier to working with the code.
So when you see "call mySub" you know it is a subroutine. If you see "ColumnWidth = myHeight() * 4" you know that you creayed a Function called myHeight.
Subroutines - right now as I understand it I can use a SUB as either a Function or Subroutine. I can opt to have it return a value or not. While this is great I also note that I can get confused easily if I happen to be doing other things for a while and then come back to my B4A project.
My first suggection is to offer that for a SUB the 'Call' statement can be optional. So for example. If you were calling a Subroutine you called 'mySub' in code you would see:
Call mySub
This would immediately tell you that you are calling a Subroutine. As code becomes more complex having the option of placing 'Call' before the Sub would make things much more clear for the developer.
One other possible suggestion I have is to have Subs broken down into Functions and Subroutines (Func/Sub).
Functions indicate that a special type of sub will be used in a formula and may have a return value (as subs do now in B4A).
A Subroutine would not return a value. It is called and actions are performed.
While subs now work well if a Developer works on several different types of projects (VB.NET, C#, Java, etc.) and then comes back to B4A wanting to make a change in code having the disctinction of Sub and Funct make re-aclimating yourself easier to working with the code.
So when you see "call mySub" you know it is a subroutine. If you see "ColumnWidth = myHeight() * 4" you know that you creayed a Function called myHeight.