Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strict typing...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00581332
Message ID:
00581593
Views:
16
Paul,

As Jess pointed out, the "String typing" available in VFP7 does not mean that you could not assign a numeric value to a variable previously declared as string. Remember that, in truth, all variables in VFP7 are considered variants. You could assign a string to a variable close to the beginning of a method and then assign a numeric value to that same variable elsewhere in that method and VFP doesn't care.

So, I'm afraid the answer to your question is no: VFP does not support String typing in the sense you've mentioned and it will not raise an error if you assign a different value type to a variable.

HTH

>Is it possible to force VFP to strictly type variables and properties...for instance I can do this:
>
>local xyz as number
>
>xyz=""
>
>and it retains the string. I have to say that I would rather it gave me an error, preferably at design time.
Travis Vandersypen
Previous
Reply
Map
View

Click here to load this message in the networking platform