Setting default values for variables

Kapslok

Member
Licensed User
Longtime User
hi there!

B4A looks promising. Been using it successfully! And the new 'B4A-bridge' speeds up the testing, thanks!

However I'm somewhat missing a quick way for setting default values for variables, strings and arrays.

This is not possible in B4A in any way?

Int myNumbers()={34,35,36...};

and since the data statements are missing too i will be ending up doing it in an awkward way...

myNumbers(0)=34
myNumbers(1)=35
myNumbers(2)=36


Best wishes,
Kapslok
 

Kapslok

Member
Licensed User
Longtime User
How to define multi-dimensional array default values?

Hi...

Another problem occured, i need to set default values and for single rank
Dim array the following works perfectly:

B4X:
Dim myNumbers() As Int
 myNumbers=Array As Int (34,35,36)

But how about converting following JAVA-code to B4A:

String words[][]={{"One","two"},{"Et","Twå"}};

Is it possible in some reasonably easy way?


best wishes,
Kapslok
 
Upvote 0
Top