Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7 Typechecking
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00427604
Message ID:
00429467
Views:
18
>>Does anyone know if MS will actually typecheck the declarations or are they for cosmetic purposes the type declarations in VFP7.
>
>THey're not for cosmetic purposes entirely, they are sensed at designtime, which is what enabled Intellisense. So if you were to delcare a variable as another class, or a COM object, VFP will figure that out, and then gather all teh properties and Methods and anythign else it needs to drive Intellisense.
>
>You can change the type of a variable, because they're are just as the have always been, Variants.

I understand the COM issue but I would have preferred that they also check the datatypes at runtime for variables that are declared as such. For example:

function foo(n as Integer) as string
local i as String
*--the next line should give a run time error.
i = n
return i

I don't know why this would be complicated to do. Of course untyped variables can always be assigned to.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform