Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!accelerator.eng.ohio-state.edu!kaa.eng.ohio-state.edu!rob From: rob@kaa.eng.ohio-state.edu (Rob Carriere) Newsgroups: comp.lang.c Subject: Re: "Numerical Recipes in C" is nonportable code Message-ID: <531@accelerator.eng.ohio-state.edu> Date: 28 Aug 88 00:56:09 GMT References: <664@lindy.Stanford.EDU> <6758@megaron.arizona.edu> <718@gtx.com> <13258@mimsy.UUCP> Sender: news@accelerator.eng.ohio-state.edu Reply-To: rob@kaa.eng.ohio-state.edu (Rob Carriere) Organization: Ohio State Univ, College of Engineering Lines: 12 In article <13258@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: > [ still on the b = malloc( foo ); bb = b - 1; code in NumRecipes ] >Such an implementation will ABORT ON THE COMPUTATION `b - 1', >possibly (indeed, preferably) at compile time. And it is legal! So the standard says, they tell me. It is also one the more flagrant violations of the Principle of Least Astonishment I've seen in a while. In fact, while we're at it, it would seem to violate the idea that you give the programmer all the rope she asks for, because she just might be needing it to pull herself out of a bog. Gentlemen system programmers, surely you too have algorithms that are more accurately expressed with arrays from other than base zero?