Deutsch English Français Italiano |
<vq190b$n7hp$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: The Natural Philosopher <tnp@invalid.invalid> Newsgroups: alt.folklore.computers,comp.os.linux.misc Subject: Re: The joy of FORTRAN Date: Sun, 2 Mar 2025 09:39:23 +0000 Organization: A little, after lunch Lines: 53 Message-ID: <vq190b$n7hp$1@dont-email.me> References: <5mqdnZuGq4lgwm_7nZ2dnZfqnPSdnZ2d@earthlink.com> <iJEJO.198176$kxD8.81657@fx11.iad> <3hOdnWpQ649QMGr7nZ2dnZfqnPidnZ2d@earthlink.com> <vd8doi$15q07$1@dont-email.me> <vd8eg7$15v1j$2@dont-email.me> <cxicnVzg_cn_eGX7nZ2dnZfqnPadnZ2d@earthlink.com> <vdapbn$1kp35$5@dont-email.me> <lltpunF4fseU2@mid.individual.net> <1smdnSjX3YoxgWf7nZ2dnZfqn_idnZ2d@earthlink.com> <llv30aFa6uvU3@mid.individual.net> <vde4b8$268qv$22@dont-email.me> <1396870532.749421730.052473.peter_flass-yahoo.com@news.eternal-september.org> <wrapper-20241001111737@ram.dialup.fu-berlin.de> <vpl5uk$hhk$3@reader1.panix.com> <c4acndn4jJXKwCP6nZ2dnZfqnPSdnZ2d@giganews.com> <1214951717.762291306.657281.peter_flass-yahoo.com@news.eternal-september.org> <m2a04pF90mqU2@mid.individual.net> <vppj5n$33b82$4@dont-email.me> <m2clmbFl430U10@mid.individual.net> <m2dp4gF577vU2@mid.individual.net> <TeucnZgT9qpy_F_6nZ2dnZfqnPGdnZ2d@giganews.com> <vpujqm$5g9r$2@dont-email.me> <V82cnbblIbFrdF76nZ2dnZfqn_udnZ2d@giganews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 02 Mar 2025 10:39:28 +0100 (CET) Injection-Info: dont-email.me; posting-host="634a34cffaf0f858d3235e88fdd1e9c3"; logging-data="761401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dz/wQ8CEI6IzmRzAxXWm7bNhZUi65Svk=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Akx6FX+SP4CAEKOR1vYb0lLfF18= In-Reply-To: <V82cnbblIbFrdF76nZ2dnZfqn_udnZ2d@giganews.com> Content-Language: en-GB Bytes: 3184 On 02/03/2025 05:17, c186282 wrote: > So : > > if(x>y) > { > ..... > } > else > { > ..... > } > > I pref to not put the leading bracket on the > same line as the 'if' or 'else' because then > it's easier to pick out the block by eye - > just look for the '{' on the left. if(x>y) { ..... } // end of if clause else { ..... } //end of else clauses Because it clearly identifies the two branches by making them differently indented And in fact these days with inline functions if(x>y) fubar(x,y,z); else rabuf (z,y,x); Is even shorter and allows the program flow rather than the implementation to be seen clearly. I wonder if compilers actually inline functions that are only called once. Most of my functions ARE called only once. They are there to perform specific tasks, like initialise hardware or connect the wi fi. -- “But what a weak barrier is truth when it stands in the way of an hypothesis!” Mary Wollstonecraft