-
Notifications
You must be signed in to change notification settings - Fork 98
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
TRACE of words with 2>R and 2R> is wrong. #162
Comments
I did an experiment.
That printed "11 22" in the original order.
So it behaves the same and puts "11 22" back on the stack. THEN I defined:
When I execute it normally it swaps the two values. What is the expected behavior for 2R> ? |
According to the ANSI spec at https://forth-standard.org/standard/core/TwoRfrom 2>R should be equivalent to "R> R> SWAP". So I believe that the pForth kernel version of 2>R and 2R> is correct and the TRACE version is incorrect. |
2R@ is also backwards in TRACE To test:
Should print "11 22 11 22".
Keep entering S until you reach EXIT. |
They needed a SWAP to match the kernel versions. Fixes #162
LGTM |
They needed a SWAP to match the kernel versions. Fixes #162
See:
pforth/fth/trace.fth
Line 275 in 6aa808a
I think there should be a swap there.
The text was updated successfully, but these errors were encountered: