Skip to content
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

Relational operators with mixed types #330

Closed
tethal opened this issue Dec 29, 2015 · 2 comments
Closed

Relational operators with mixed types #330

tethal opened this issue Dec 29, 2015 · 2 comments
Assignees
Milestone

Comments

@tethal
Copy link
Contributor

tethal commented Dec 29, 2015

It is not clear from the documentation how does comparison of different types work.

For example:

$ qore -n -X '"65536" < 65536n'
True
$ qore -n -X '65536.0 < 65536n'
True
$ qore -n -X '65536 < 65536n'
True
$ qore -n -X '65536 == 65536n'
True
$ qore -n -X '65536 <= 65536n'
False

May be related to #25

@tethal tethal added the bug label Dec 29, 2015
@tethal
Copy link
Contributor Author

tethal commented Dec 29, 2015

This has nothing to do with #25

$ qore -n -X '65536n <= 65536n'
False
$ qore -n -X '65536n < 65536n'
False
$ qore -n -X '65536n == 65536n'
True
$ qore -n -X '65536n > 65536n'
False
$ qore -n -X '65536n >= 65536n'
False

@davidnich
Copy link
Contributor

there are bugs in expressions executed at parse time and substituted into the parse tree:

qore -ne 'number n = 1n; printf("%y\n", n >= 1n);'
True

whereas:

qore -nX '1n >= 1n'
False

I'm working on it.

davidnich added a commit that referenced this issue Dec 29, 2015
…larly regarding arbitrary-precision numeric values
tethal added a commit that referenced this issue Dec 29, 2015
…on_operators

refs #330 fixed several bugs in logical comparison operators, particu…
@tethal tethal added the fixed label Dec 29, 2015
@tethal tethal closed this as completed Dec 29, 2015
@davidnich davidnich added this to the 0.8.12 milestone Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants