Dim x, y, z As Number
Dim x as Number = 3
- Shorter syntax for declaration of multiple variables:
The following code:
Will declare all three variable with the Number type.B4X:Dim x, y, z As Number
The rule is that there must be only one type in the declaration line and it must be after the last variable.
The final version should be very similar to this one (and not so far away...).
Well almost! :sign0013:fixes several bugs including the inaccurate screen size
The rule is that there must be only one type in the declaration line and it must be after the last variable.
That is currently not possible.is it possible also to assign a value while declaring (everything in one line)
Thanks Andy. Will be fixed. (Doh!)Well almost!
There seems to be an off-by-two in the width in the desktop IDE. In the Designer, Tools->Screen Size for a new Form shows a width of 242 although the Form is actually 240 wide when run on the desktop. Pressing the Default button sets the width to 240 which makes the window 238 wide at runtime.
Also in the Designer the disabled width and height textboxes for a Form permanently show 240 and 264 regardless of the actual Form size - and anyway 264 is wrong for a default screen, it should be 268.
What do you mean with "work OK"? The integer type is only applied to 'z' and the boolean is only applied to c.Dim x, y, z As Integer, a, b, c As Boolean
This seems to work OK, is it intended to?
Dim x, y, z As Integer
Dim a, b, c As Boolean
Msgbox(a,x)
Dim x, y, z As Integer, a, b, c As Boolean
Msgbox(a,x)
Sorry, I misinterpreted the change that you had made as always applying a trailing type to a comma separated set of variables without an explicit type so changing the behaviour compared to 6.85. I assumed (always dangerous!) that the previous form was not accepted. I think it is potentially confusing to have both forms availableWhat do you mean with "work OK"?
I tend to agree. Maybe it is better to apply the given type to all leading variables even if it is not the last type.I think it is potentially confusing to have both forms available
Dim x, y, z As Integer, a, b, c As Boolean
Yes, that is what I originally interpreted it as doing.Maybe it is better to apply the given type to all leading variables even if it is not the last type
Some of us however are already used to this which is why I misinterpreted the change.I will not use this new possibility, too confusing..
I was used to VB6 where
Dim a, b, c As Integer
a Variant
b Variant
c Integer
Best regards.
- Labels text color changes to gray for disabled labels (this is actually a bug fix).
I can confirm that error, but only in the IDE - compiled it is fine.TextBox1.Focus throw the error below ?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?