-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class operators Distinct from xHarbour #245
Comments
Harbour does not support bit operators overloads, because there is no support for those operators at all: https://github.com/harbour/core/blob/master/doc/xhb-diff.txt#L1055 I think this is mainly due to Clipper compatibility clashes. & is a macro operator. There is a FOR EACH overloading example though: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is likely at most something to document in xhb-diff.txt, but xHarbour supports these 6 class operator overloads, that harbour does not:
Also the naming convention, which can be used to override an operator, is different for xHb's
__OpContains
and hb's (Interchangeable?)__OPINCLUDE
and__OPINSTRING
Is the choice to not have the Bit operators and for each intentional?
As a note, since I haven't seen documentation for
for each
overloading in xhb this is the behavior:So calling
for each n in forEachReconObjectHolder():new(3)
will iterate through1
,2
,3
and then exit. From the iterate call, it first calls with a depth, 1, where you then can return. If you return something iteratable it will iterate through it and then call with a nDepth of 2. If an object is returned it then will call with the same depth and a step, and the value will reflect exactly what you return, even if it's nil. To break the loop you need to callbreak
at which point it will call with the next depth.The text was updated successfully, but these errors were encountered: