Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pemstatus vs amembers
Message
 
À
30/11/2010 03:20:57
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01491017
Message ID:
01491048
Vues:
66
VARTYPE() only works off instances not of string based expressions. The original example uses string names for the property and that doesn't work with VARTYPE() unless you use macro substitution which would defeat any perf benefit you'd get over TYPE() in the first place.

+++ Rick ---

>Hi Thomas,
>
>if yo go for the TYPE instead of PEMSTAT why not VARTYPE?
>
>Agnes
>
>>>I have a program that checks to see if a property already exists on an object before adding it, which would be the better way to determine if the property already exists?
>>
>>You can call addproperty even if the property does exist, if you only have the need to set.
>>The operation is even faster ;-)
>>If you are checking before a get, Type() might help you more than !Pemstat
>>
>>>
>>>    IF PEMSTATUS( m.loMyObject, [cNewProperty], 5)
>>>      ADDPROPERTY( m.loMyObject, [cNewProperty], [Test Information])
>>>    ENDIF
>>>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform