Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Entering numeric-like text in class property
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Entering numeric-like text in class property
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01156255
Message ID:
01156255
Vues:
77
I want to enter a string that looks like a number such as 1.0 in a class property "version". If I enter it as 1.0 (without quotes) the class treats it as a numeric so I have to do str(obj.version) to get it to text. But then I may need "1.0" so I need str(obj.version,3,1)... or I might need "1" so str(obj.version,3,1) won't work. I can enter "1.0" in the class property but then sometext="Version: " + obj.version shows 'Version: "1.0"' What is the best way around this? Do I have to enter it as "1.0" in the class then strtran the quotes out whenever I need it?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform