Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #389243
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: else ladders practice |
| Date | 2024-11-30 14:07 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <86o71wnznu.fsf@linuxsc.com> (permalink) |
| 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> |
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.
Back to comp.lang.c | Previous | Next | Find similar
Re: else ladders practice Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-11-30 14:07 -0800
csiph-web