Deutsch English Français Italiano |
<86o71wnznu.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: else ladders practice Date: Sat, 30 Nov 2024 14:07:49 -0800 Organization: A noiseless patient Spider Lines: 26 Message-ID: <86o71wnznu.fsf@linuxsc.com> References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> <slrnvi746p.fkp.dan@djph.net> <else-20241116103316@ram.dialup.fu-berlin.de> <vhacrv$2nb3$1@dont-email.me> <vhi4j0$1s0qv$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sat, 30 Nov 2024 23:07:49 +0100 (CET) Injection-Info: dont-email.me; posting-host="cbb822f8f85af8befb29db6227d47c5b"; logging-data="2066195"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193MAfIaxWvigiie8N65nP/N24Q2EjLR+g=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:GHpCje27o2yZRfk2+soXBeHK724= sha1:48XtycxRTqpLcWaKmjzD1lOfopo= Bytes: 1907 Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > On 16.11.2024 16:14, James Kuyper wrote: > >> On 11/16/24 04:42, Stefan Ram wrote: >> ... >> >>> [...] >>> >>> #include <stdio.h> >>> >>> const char * english( int const n ) >>> { const char * result; >>> if( n == 0 )result = "zero"; >>> if( n == 1 )result = "one"; >>> if( n == 2 )result = "two"; >>> if( n == 3 )result = "three"; >>> else result = "four"; >>> return result; } > > That's indeed a nice example. Where you get fooled by treachery > "trustiness" of formatting[*]. - In syntax we trust! [**] Misleading formatting is the lesser of two problems. A more significant bad design choice is writing in an imperative style rather than a functional style.