🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.programmeren
Article #332

Re: Lijnen tellen van een project

#332
From: Johan Wevers
Date: Wed, 26 Jan 2005 10:35
22 lines
1742 bytes
John Bokma <postmaster@castleamber.com> wrote:

>>      if (('F' == sex) || (('f' == sex) && (sex = 'F'))) do_female;
>>      else if (('M' == sex) || (sex = 'M')) do_male;

>Wat ik vreselijk onlogisch vind, en volgens mij ooit verzonnen om 
>assignments in een if te ontdekken.

Daar wordt het expliciet voor aangeprezen ja.

>Ik meen mij te herinneren dat een beetje compiler daar een waarschuwing op
>geeft ( op: if ( sex = 'F' ) that is ).

Maar in bovenstaand voorbeeld wil je dat juist. Compilers die over alles
zeuren zijn ook niet altijd gewenst. Zo zet ik in Delphi 7 heel wat warnings
expliciet uit (al dat gezeur over zaken die in .NET niet geaccepteerd
worden zoals pointer casts).

-- 
ir. J.C.A. Wevers         //  Physics and science fiction site:
johanw@vulcan.xs4all.nl   //  http://www.xs4all.nl/~johanw/index.html
PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
Technical Details
Message-ID: <IAx6rK.1pB@vulcan.xs4all.nl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!newsgate.cistron.nl!transit.news.xs4all.nl!post.news.xs4all.nl!uucp.xs4all.nl!xs4all!vulcan!johanw
References: <%XJId.2415$OZ2.252982@phobos.telenet-ops.be> <Xns95E982F869770castleamber@130.133.1.4> <ct6veq.4f8.1@news.isolution.nl> <Xns95EA98A5B4Dcastleamber@130.133.1.4>

Show Full Headers
Complete Article Headers
X-Google-Thread: 107324,ab34a8b99e320381
X-Google-Thread: fcea4,ab34a8b99e320381
X-Google-Attributes: gid107324,gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Newsgroups: nl.comp.programmeren,be.comp.programming
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!newsgate.cistron.nl!transit.news.xs4all.nl!post.news.xs4all.nl!uucp.xs4all.nl!xs4all!vulcan!johanw
From: johanw@vulcan.xs4all.nl (Johan Wevers)
Subject: Re: Lijnen tellen van een project
Organization: Vulcan Academy of Sciences
Message-ID: <IAx6rK.1pB@vulcan.xs4all.nl>
References: <%XJId.2415$OZ2.252982@phobos.telenet-ops.be> <Xns95E982F869770castleamber@130.133.1.4> <ct6veq.4f8.1@news.isolution.nl> <Xns95EA98A5B4Dcastleamber@130.133.1.4>
Date: Wed, 26 Jan 2005 10:35:44 GMT
Lines: 22