Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return values and other standards
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Return values and other standards
Miscellaneous
Thread ID:
00154804
Message ID:
00154804
Views:
64
I recently learned the C programming standard for method return values:
0 if the method completed successfully,
<0 the method encountered some internal error, and
>0 the method encountered some application error.

I was wondering how people implemented "Get" methods.

You can stick to the approach above and return the appropriate property value in a parameter passed by reference, but this is an awkward interface for the UI.

If you don't use this approach, then how do you tell the UI an error occured? I suppose you could return either the property value or some special value to indicate an error, but this also creates a "muddy" interface for the UI-- for example, the property value could be a different type than your error return value.

Thanks.

- Mark
----------
Mark Bucciarelli
Next
Reply
Map
View

Click here to load this message in the networking platform