Re: Dimensionsing of variables

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Bob" <someonw@xxxxxx> wrote in message
news:uWuy3p9%23IHA.4816@xxxxxxxxxxxxxxxxxxxxxxx

I was wondering if in VB6 (or .NET) there a way of dimensioning variables
based on the value of other variables. For example;
Dim X as Double
X=Val(Text1.Text)
If X<0 then
Dim Y as Double
Else
Dim Y as Integer
Endif

No, it can't, and can you give a real-world example of where this would even
be useful? (With the primitive data types you used in the example, I mean,
not in the sense of classes.)


.