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

SORT/COMPARE is using reversed order when using integer as a result from the function #2376

Open
Oldes opened this issue May 24, 2019 · 0 comments

Comments

@Oldes
Copy link

Oldes commented May 24, 2019

In Rebol2:

>> sort/compare [1  10  3 ] func[x y][print [x y] case [x > y [1] x < y [-1] true [0]]]
10 3
1 10
3 1
== [1 3 10]

In Red:

>> sort/compare [1  10  3 ] func[x y][print [x y] case [x > y [1] x < y [-1] true [0]]]
10 1
3 10
3 1
== [1 3 10]

But in Rebol3:

>> sort/compare [1  10  3 ] func[x y][print [x y] case [x > y [1] x < y [-1] true [0]]]
10 1
3 1
3 10
== [10 3 1]

Notice the reversed order!

@Oldes Oldes changed the title SORT/COMPARE is using reversed order when using integer as a result from thee function SORT/COMPARE is using reversed order when using integer as a result from the function May 24, 2019
Oldes added a commit to Oldes/Rebol3 that referenced this issue May 24, 2019
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