Deutsch English Français Italiano |
<6726D029.1010809@grunge.pl> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: fir <fir@grunge.pl> Newsgroups: comp.lang.c Subject: Re: else ladders practice Date: Sun, 03 Nov 2024 02:21:45 +0100 Organization: i2pn2 (i2pn.org) Message-ID: <6726D029.1010809@grunge.pl> References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> <vg0t3j$2ruor$1@dont-email.me> <78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org> <vg2g37$37mh3$1@dont-email.me> <6724CFD2.4030607@grunge.pl> <vg2llt$38ons$1@dont-email.me> <2491a699388b5891a49ef960e1ad8bb689fdc2ed@i2pn2.org> <b681ee05856e165c26a5c29bf42a8d9d53843d6d@i2pn2.org> <vg2ttn$3a4lk$1@dont-email.me> <vg33gs$3b8n5$1@dont-email.me> <vg358c$3bk7t$1@dont-email.me> <vg37nr$3bo0c$1@dont-email.me> <vg3b98$3cc8q$1@dont-email.me> <vg5351$3pada$1@dont-email.me> <vg62vg$3uv02$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: i2pn2.org; logging-data="680075"; mail-complaints-to="usenet@i2pn2.org"; posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0"; User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 To: Bart <bc@freeuk.com> In-Reply-To: <vg62vg$3uv02$1@dont-email.me> X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 2435 Lines: 39 Bart wrote: > > It's a mess. By contrast, my if statements look like this: > > if then elsif then ... [else] fi > > > 'elsif' is a part of the syntax. The whole thing can return a value. > There is a compact form (not for elsif, that would be too much) as shown > above. as to if when thinking of it the if construct has such parts if X then S else E and the keyword if is not necessary imo as the expression x return logical value them then can be used on this without if X then {} X else {} i would prefer to denote (at least temporerely) then as -> and else as ~> then you can build construct like a -> b -> c -> d ~> e ~> f when the arrows take logical value of the left (if a true then b, if be true then c if c true then d,if d false then e and if e false then f) but some need also to use else to some previous espression and i think how it could be done but maybe just parenthesis can be used a (->b->c) ~>z if a true then b and if b true then c but if a false then z