vecino Well-Known Member Licensed User Longtime User Jun 5, 2013 #1 Hello, in other languages I have the habit of doing something like this: B4X: Dim iVar1, iVar2, iVar3 as int As with functions, procedures, etc.. B4X: sub SumCalculate( iV1, iV2, iV3 as int) as int return (iV1 + iV2 + iV3) end sub Are "iVar1" and "iVar2" kind integer? Thank you very much and greetings.
Hello, in other languages I have the habit of doing something like this: B4X: Dim iVar1, iVar2, iVar3 as int As with functions, procedures, etc.. B4X: sub SumCalculate( iV1, iV2, iV3 as int) as int return (iV1 + iV2 + iV3) end sub Are "iVar1" and "iVar2" kind integer? Thank you very much and greetings.
Erel B4X founder Staff member Licensed User Longtime User Jun 5, 2013 #2 'Dim' supports this shorthand syntax. You can also write: B4X: Dim z = 2, y = 4 As Int For subs however you need to write the type of each parameter. Otherwise String will be used and a warning will appear. Upvote 0
'Dim' supports this shorthand syntax. You can also write: B4X: Dim z = 2, y = 4 As Int For subs however you need to write the type of each parameter. Otherwise String will be used and a warning will appear.
vecino Well-Known Member Licensed User Longtime User Jun 5, 2013 #3 Thank you very much and greetings Upvote 0