Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strict typing...
Message
From
15/11/2001 10:55:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00581332
Message ID:
00582113
Views:
17
>While you can't do it with variables (as others have posted), you can do it with properties using an Assign method. In the Assign method, check the incoming assignment to see if it adheres to your data type. If it does, assign the new value. If not, disregard it or throw an error.

... or convert to the correct type. For instance, many built-in VFP functions and properties can accept both numeric and logical values (e.g. TableUpdate(), CheckBox.ControlSource).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform