Previous Next Table of Contents

4. :className

With Class(y) (and Clipper in general), there is no real difference between a method call and a variable access. It is quite valid to write both:

n := oFoo:count

and

n := oFoo:count()

In Xbase++ it would appear that the above two lines of code are not the same. Because of this a call to :className is not valid and will return a run time error, a call to :className() is fine.

To allow your code to work with both environments you should always use the method call syntax. Note that this problem isn't specific to className, it will cause errors whenever you've used variable access to call a method.


Previous Next Table of Contents