Article View: comp.lang.forth
Article #115Re: F.N floating point format word
From: Krishna Myneni
Date: Sat, 17 Oct 2026 15:55
Date: Sat, 17 Oct 2026 15:55
61 lines
3257 bytes
3257 bytes
On 10/17/26 10:27 AM, Anton Ertl wrote: > Krishna Myneni <krishna.myneni@ccreweb.org> writes: >> On 10/17/26 12:27 AM, Anton Ertl wrote: >>> Krishna Myneni <krishna.myneni@ccreweb.org> writes: >>>> IF ... IF ... ELSE ... ELSE ... THEN THEN >>>> >>>> Is this consistent with the standard? >>> >>> Yes, but >>> >>> if A if B else C else D THEN THEN >>> >>> is equivalent to >>> >>> if A if B D else C then then >>> ... >> This does not seem to be what it does in either Gforth or kForth with >> the following example, considering all possible boolean inputs. >> >> : test ( n1 n2 -- ) >> IF >> ." n2 is true" cr >> IF >> ." n1 is true" cr >> ELSE >> ." n1 is false" cr >> ELSE >> ." ??" cr >> THEN >> THEN >> ; >> >> >> === Gforth output === >> \ 1 false false ok >> false false test ok 1 >> .s <1> 0 ok 1 >> drop >> >> \ 2 false true ok >> >> \ 3 true false ok >> >> \ 4 true true ok >> .s <0> ok >> === end output === >> >> With Gforth, nothing is ever printed. > > If n2 is false nothing should be printed. And that's the only test > you did. The outer IF...THEN is just a distraction and is not > involved in the IF ... ELSE ... ELSE ... THEN. Here are more > interesting cases: > I only had the comments, and looking back I didn't actually do the other tests with Gforth. Good to know there is consistency here. -- KM
Technical Details
Message-ID:
<11b05p9$bdj8$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<119oin2$26n99$1@dont-email.me> <11a01mr$sqrm$1@dont-email.me> <20261005150222.00006cf5@tin.it> <11a16nc$1camn$1@dont-email.me> <20261006080347.00002cdf@tin.it> <11a4tj5$2ku7v$1@dont-email.me> <20261007223526.000065ab@tin.it> <6ac7013a$1@news.ausics.net> <20261008121302.00007412@tin.it> <20261008152645.00001682@tin.it> <11a88oh$3t0ti$1@dont-email.me> <20261008220746.0000042f@tin.it> <11autmd$3t6hf$1@dont-email.me> <2026Oct17.072757@mips.complang.tuwien.ac.at> <11b00rn$8qqe$1@dont-email.me> <2026Oct17.172746@mips.complang.tuwien.ac.at>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Krishna Myneni <krishna.myneni@ccreweb.org> Newsgroups: comp.lang.forth Subject: Re: F.N floating point format word Date: Sat, 17 Oct 2026 10:55:21 -0500 Organization: A noiseless patient Spider Lines: 61 Message-ID: <11b05p9$bdj8$1@dont-email.me> References: <119oin2$26n99$1@dont-email.me> <11a01mr$sqrm$1@dont-email.me> <20261005150222.00006cf5@tin.it> <11a16nc$1camn$1@dont-email.me> <20261006080347.00002cdf@tin.it> <11a4tj5$2ku7v$1@dont-email.me> <20261007223526.000065ab@tin.it> <6ac7013a$1@news.ausics.net> <20261008121302.00007412@tin.it> <20261008152645.00001682@tin.it> <11a88oh$3t0ti$1@dont-email.me> <20261008220746.0000042f@tin.it> <11autmd$3t6hf$1@dont-email.me> <2026Oct17.072757@mips.complang.tuwien.ac.at> <11b00rn$8qqe$1@dont-email.me> <2026Oct17.172746@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 17 Oct 2026 15:55:22 +0000 (UTC) Injection-Info: dont-email.me; logging-data="374376"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NHKxofGIcPsKxsbIPILOc"; posting-host="e44790808d9367a5c724567d377e4b9f" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Hgb3eD40bKfy70bMHQzrRGqJqAg= sha256:JOMzfuEG2XHj4FooI4+UL6t+WCdCE8UWBNOLiSEZCp4= sha1:zOpAK9/Dfsk2InobsCnh9+u7x9o= sha256:aVMGxfEfc7LRR/xTl5e8fG6Np0/SqQEmeHZucruROIk= In-Reply-To: <2026Oct17.172746@mips.complang.tuwien.ac.at> Content-Language: en-US