Wish Error 5: Variable declaration type missing for "Types"

Mashiane

Expert
Licensed User
Hi there

For Types if a variable has not been indicated with a type, please flag.

eg

B4X:
Type GridColumn(Columns As Int, OffsetXSmall, OffsetSmall As String,
OffsetXSmall has no type.

Ta!
 

Erel

Administrator
Staff member
Licensed User
After further investigation, it is actually allowed as Type behaves the same as Dim:
B4X:
Dim x, y As Int
Type GridColumn (Columns As Int, OffsetXSmall, OffsetSmall As String)

Dim z 'warning here
Type ZZZ (Columns As Int, OffsetXSmall) 'warning here
 

Mashiane

Expert
Licensed User
Noted and thanks, on the bright side, not declaring variable types is 'bad' programming (according to whose standards? lol) and I keep forgetting at times and make these silly mistakes, then Boom, run my app with BANano and all hell breaks loose until I fix the variable types.

Funny because it does pick it up on the second type you have declared and assumes a string will be used, and not on the first type for OffsetXSmall.

Thanks anyway, will keep on learning.
 
Top