From owner-freebsd-chat Thu Jan 25 13:34:47 2001 Delivered-To: freebsd-chat@freebsd.org Received: from smtp10.phx.gblx.net (smtp10.phx.gblx.net [206.165.6.140]) by hub.freebsd.org (Postfix) with ESMTP id D9F3937B6A3 for ; Thu, 25 Jan 2001 13:34:29 -0800 (PST) Received: (from daemon@localhost) by smtp10.phx.gblx.net (8.9.3/8.9.3) id OAA65920; Thu, 25 Jan 2001 14:34:17 -0700 Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp10.phx.gblx.net, id smtpdUsg1ia; Thu Jan 25 14:34:11 2001 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id OAA28804; Thu, 25 Jan 2001 14:34:18 -0700 (MST) From: Terry Lambert Message-Id: <200101252134.OAA28804@usr08.primenet.com> Subject: Re: silly C style question To: mckay@thehub.com.au (Stephen McKay) Date: Thu, 25 Jan 2001 21:32:57 +0000 (GMT) Cc: iain@research.canon.com.au (Iain Templeton), chat@FreeBSD.ORG, mckay@thehub.com.au In-Reply-To: <200101241124.f0OBOgm22341@dungeon.home> from "Stephen McKay" at Jan 24, 2001 09:24:42 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > if > ( > (id->id_type == NULL) > || > ( > (id->id_type->x_what == xt_arrayof) > && > (item->x_left->x_what == xt_arrayof) > && > (id->id_type->x_subtype == item->x_left->x_subtype) > && > (id->id_type->x_flags & XIS_DIMLESS) > ) > ) > ... > > Try that one any other way. :-) if( ( id->id_type == NULL) || ( ( id->id_type->x_what == xt_arrayof) && ( item->x_left->x_what == xt_arrayof) && ( id->id_type->x_subtype == item->x_left->x_subtype) && ( id->id_type->x_flags & XIS_DIMLESS))) or, less prettily, something like: if( ( id->id_type == NULL) || ( ( id->id_type->x_what == xt_arrayof) && ( item->x_left->x_what == xt_arrayof) && ( id->id_type->x_subtype == item->x_left->x_subtype) && ( id->id_type->x_flags & XIS_DIMLESS) ) ) PS: The second example is included for those without a "showmatch" option or unable to use "%" effectively in "vi", and with a penchant for needing operators at the front of the line, due to a crippling injury by an HP calculator in their youth, leaving them unable to reasonably program in non-RPN languages, like "C", yet unwilling to stick to "FORTH", where they belong. 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message