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

Number Constants #259

Closed
SamCoVT opened this issue Oct 9, 2020 · 1 comment
Closed

Number Constants #259

SamCoVT opened this issue Oct 9, 2020 · 1 comment
Labels
enhancement Would't this be cool? todo What should be done next

Comments

@SamCoVT
Copy link
Contributor

SamCoVT commented Oct 9, 2020

I was reading through the 2012 standard and found the following in Annex C, which talks about compatibility with older forths and notes changes that might need to be made:

Decimal, hexadecimal, binary number literals can now be written irrespective of BASE by using the prefix #, $, %. Also, character literals can be written as 'c'. Standard programs are unaffected. Systems have to be changed to recognize these forms.

There's also a link to 3.4.1.3 Text interpreter input number conversion that says essentially the same thing.

The means that 'a' should be recognized as the letter "a" and $ABCD is always a hex value and #1234 is always a decimal value and %10110 is always a binary value, regardless of BASE.

@SamCoVT
Copy link
Contributor Author

SamCoVT commented Dec 9, 2020

Solved by pull request #262

@scotws scotws added enhancement Would't this be cool? todo What should be done next labels Dec 20, 2020
@scotws scotws assigned scotws and unassigned scotws Dec 20, 2020
@scotws scotws closed this as completed Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Would't this be cool? todo What should be done next
Projects
None yet
Development

No branches or pull requests

2 participants