Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strict typing...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00581332
Message ID:
00581593
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform