-
Notifications
You must be signed in to change notification settings - Fork 15
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
Ambiguous condition with , in core.fr #18
Comments
You're correct and well spotted. Its only been in core.fr for over 20 years! We have to make sure that dataspace is aligned before testing , and since CREATE isn't tested until later we should test ALIGN and ALIGNED first. I see that CONSTANT isn't tested until later (line 735) but is well used before, as early as line 40. I should probably add CONSTANT to the words given a simple test in prelim.fth. Also I see that there is a comment that negative ALLOT needs to be tested. We might as well add that while we're about it. I'll think about it later when I've a bit more time. |
Sorry, I forgot about this issue until I updated something else. I have added a test for ALIGN and ALIGNED and used ALIGN just before the test for , (comma). As CONSTANT is used quite often in core.fr before being tested I have added a simple test for CONSTANT in prelimtest.fth |
Looking at this sequence:
https://github.com/gerryjackson/forth2012-test-suite/blob/master/src/core.fr#L548-L556
then there is no guarantee that the data-space pointer will be aligned when executing
,
. Many Forths implemementCONSTANT
usingCREATE
which would hide this issue.http://forth.sourceforge.net/std/dpans/dpans6.htm#6.1.0150
The text was updated successfully, but these errors were encountered: