Date: Thu, 25 Jan 2001 10:08:00 +1100 (EST) From: Iain Templeton <iain@research.canon.com.au> To: Stephen McKay <mckay@thehub.com.au> Cc: freebsd-chat@freebsd.org Subject: Re: silly C style question Message-ID: <Pine.LNX.4.10.10101251003320.20257-100000@blow.research.canon.com.au> In-Reply-To: <200101241124.f0OBOgm22341@dungeon.home>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 24 Jan 2001, Stephen McKay wrote: > Imported from Basser Department of Computer Science, University of Sydney? > Piers Lauder was mad keen on this diabolical but extremely logical indenting > scheme. > Hmm, quite possible. I don't know where the proponents of this scheme came from (it was developed 5-10 years ago), but given that we are in Syndey that is quite possible. I think UniTas seemed to have a fairly inconsistent style between the different lecturers, but vaguely Allman style, or perhaps K&R. > Example: > > 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) > ) > ) > ... > Yes, exactly, we alas sometimes have statements that are that complex. The same dealing with hardware sometimes. You know, reg = ( (field1 << REG_FIELD1_SHFT) | (field2 << REG_FIELD2_SHFT) | (field3 << REG_FIELD3_SHFT) ); Names changed to protect the innocent (and my job). Iain To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10101251003320.20257-100000>