Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strict typing...
Message
De
15/11/2001 10:55:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00581332
Message ID:
00582113
Vues:
18
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform