Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: fizzbuzz problem in forth Date: Tue, 17 May 2016 11:14:20 -0700 Organization: A noiseless patient Spider Lines: 13 Message-ID: <87k2ismu0z.fsf@jester.gateway.pace.com> References: <2210aa04-1df4-4328-bf8c-66fbf845609c@googlegroups.com> <871t566dwf.fsf@jester.gateway.pace.com> <2016May13.145248@mips.complang.tuwien.ac.at> <8760udodtl.fsf@jester.gateway.pace.com> <2016May17.154948@mips.complang.tuwien.ac.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="589dd00be5ee573d7046ed589be3c50c"; logging-data="21925"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QC5hyIWQr2z3bcoce/KFq" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:DzewsaRUX+Qx0CabEN9xP7a5aKU= sha1:nmqUYqZ6eKy6KpPjzej72vi5tE0= Xref: csiph.com comp.lang.forth:47258 anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: > In some cases, print something else; if you don't print something > else, print the number. > Not sure why you smell something here. Because that description is wrong. It's more like "in some cases, print some specified string. Otherwise, print the number". The trouble is that the specified string might be the empty string. So you hit that case and print the empty string as requested. But then examine the print buffer and see that you haven't printed anything, so you erroneously conclude that you're in the "otherwise" case, so you print the number when you shouldn't. That's why you want a Maybe value instead of checking whether you've printed anything.