Android Question Is named parameters supported in B4A?

lightay

Member
Licensed User
Named Parameters helps make the code easier to understand. Is this feature supported in B4A? If not, could it be a feature request?
 

Erel

Administrator
Staff member
Licensed User
Named parameters are not supported. You can make a feature request in the wishlist forum for this.

While it is not really useful in this case I will still mention that the code you posted can be translated to:
B4X:
MyFunctionCall(CreateMap("xPosition": 20, "yPosition": 50, ...))

Sub MyFunctionCall(params As Map)
 

lightay

Member
Licensed User
Thanks for all your suggestions. But the code is still more readable with named parameters.
 

NeoTechni

Well-Known Member
Licensed User
I'd rather it tell us which parameter we are currently editing. VB6 shows it in bold in the tooltiptext for example. Its hard to keep track when you have a lot of parameters.

Maybe even a way to keep a lot of the same function calls tableized into columns for neat code
 
Top