Path: utzoo!mnetor!uunet!husc6!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: The need for D-scussion (was Re: D Wishlist) Message-ID: <2957@haddock.ISC.COM> Date: 15 Mar 88 00:35:59 GMT References: <12176@brl-adm.ARPA> <1988Mar11.215238.976@utzoo.uucp> <3732@bloom-beacon.MIT.EDU> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 10 In article <3732@bloom-beacon.MIT.EDU> tada@athena.mit.edu (Michael Zehr) writes: >a function the returns both a % b and a / b at the same time. ANSI C has two flavors of this, in function form: div() and ldiv(). The return value is a structure, which makes it a bit awkward to use if you want both results. Also, unlike the / and % operators, the result is well-defined (guaranteed vax-like) for negative numbers, so it is not necessarily identical to the pair {a/b, a%b}. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint