Trouble understanding double-length numbers #372
-
Absolute Forth beginner here, mostly working my way through Starting FORTH (as recommended by the README). At any rate, various FORTH manuals (Starting FORTH and A Beginner's Guide to FORTH) talk about double-length numbers as though they are quite simple to work with. For example, Starting FORTH says, "Some Forth implementations (including SwiftForth) will convert any number that contains the following characters as a double number: + , - . / : " and Beginner's Guide says "A double-length integer is entered from the keyboard by including a decimal point in it." So, at the least both texts seem to agree that adding a What is the equivalent in DurexForth? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hi!
Durexforth does not support parsing double numbers by adding decimal point.
Instead of typing ”1234.” , you would have to type ”1234 0” (or is it other
way around? Don’t remember right now.)
…On Wed, 27 Oct 2021 at 11:16, Christopher Drum ***@***.***> wrote:
Absolute Forth beginner here, mostly working my way through Starting FORTH
(as recommended by the README). At any rate, various FORTH manuals
(Starting FORTH and A Beginner's Guide to FORTH) talk about double-length
numbers as though they are quite simple to work with.
For example, Starting FORTH says, "Some Forth implementations (including
SwiftForth) will convert any number that contains the following characters
as a double number:
- , - . / : " and Beginner's Guide says "A double-length integer is
entered from the keyboard by including a decimal point in it."
So, at the least both texts seem to agree that adding a . to an input
number will be converted into a double-length number and placed on the
stack as such. However, this does not seem to be the case for DurexForth.
What is the equivalent in DurexForth?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#372>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34OZ2OVHGC6WMQ3RXFS3UI67P5ANCNFSM5GZ2MXTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
Indeed, the Double-Number word set is optional
http://lars.nocrew.org/forth2012/double.html
|
Beta Was this translation helpful? Give feedback.
-
#445 has some good examples of using longs. |
Beta Was this translation helpful? Give feedback.
#445 has some good examples of using longs.