Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pemstatus vs amembers
Message
 
 
To
30/11/2010 00:26:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01491017
Message ID:
01491078
Views:
39
>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?
>
>
>    AMEMBERS( m.laPropertySet, m.loMyObject )
>    IF ASCAN(m.laPropertySet,[cNewProperty],1,0,1,1)>0 && Case insensitive search, 0-not found
>      ADDPROPERTY( m.loMyObject, [cNewProperty], [Test Information])
>    ENDIF
>    
>    && or should I do this instead:
>    
>    IF PEMSTATUS( m.loMyObject, [cNewProperty], 5)
>      ADDPROPERTY( m.loMyObject, [cNewProperty], [Test Information])
>    ENDIF
>
>
>What do you think?

Without checking other replies - surely Pemstatus or also GetPem.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform