Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!oberon!sm.unisys.com!ism780c!news From: news@ism780c.isc.com (News system) Newsgroups: comp.lang.c Subject: Re: Numerical Recipes is non-portable code Message-ID: <15029@ism780c.isc.com> Date: 2 Sep 88 22:54:57 GMT References: <557@accelerator.eng.ohio-state.edu> Reply-To: marv@ism780.UUCP (Marvin Rubenstein) Organization: Interactive Systems Corp., Santa Monica CA Lines: 23 In article <557@accelerator.eng.ohio-state.edu> rob@kaa.eng.ohio-state.edu (Rob Carriere) writes: > There are >however problems (of a more specialized nature, and the arrays do not >necessarily model vectors or matrices) where the base does make a >difference. I should know, I write the stuff! > > >Rob Carriere Could you give a small example, perhaps I don't understand. with a declaration (using an extended version of C): int x(5:49),y(0:44); int i,k; i=6; k=x(i); /* easy to write access to second item */ k=y(i-5); /* more trouble to write access to second item */ However, with a reasonable compiler, both assignments to k will generate identical code. Your compiler may vary :-). But if you are writing time critical code with a faulty compiler, I guess you do what you can. Marv Rubinstein