In VB, we can declare several variables of the same type in this way:
Dim test1, value2, result as Integer
Or, multiple variables of different types like this:
Dim a, b, c As single, x, y as Double
In Mercury, there could also be this way of declaring multiple variables all of the same type:
Dim as Integer test1, value2, result
Although there is already a syntax for declaring several variables of the same type, I find this syntax very interesting. In freebasic, this syntax exist.
OK!!
I agree with your opinion.
And also after I sent this posts, I was thinking it doesn’t add anything new to the language.
And also after reading your arguments it makes sense what you say.
Actually Dim test1, value2, result as Integer
works in vb, but Dim test1, value2, result as Integer = 5
does not, because multiple variables can’t initialised at the same time to the same value.
It would be an interesting feature, me thinks.