Path: utzoo!mnetor!uunet!husc6!think!ames!hao!noao!mcdsun!mcdchg!clyde!watmath!atbowler From: atbowler@watmath.waterloo.edu (Alan T. Bowler [SDG]) Newsgroups: comp.lang.c Subject: Re: Fast way to update grids Message-ID: <17001@watmath.waterloo.edu> Date: 19 Feb 88 01:56:42 GMT References: <255@imagine.PAWL.RPI.EDU> <690005@hpfelg.HP.COM> <2212@geac.UUCP> Reply-To: atbowler@watmath.waterloo.edu (Alan T. Bowler [SDG]) Organization: U. of Waterloo, Ontario Lines: 22 In article <2212@geac.UUCP> daveb@geac.UUCP (David Collier-Brown) writes: > As >the white book is written to allow edge-vector addressing, and at >least one pcc-based compiler uses it, this turns out to be >compiler-dependent. > As it happens, the Waterloo (GCOS) C compiler uses edge-vectors, but >also (if memory serves) keeps the pointed-at data contiguous to >allow such assumptions to work nevertheless. Something of a ``best >of both worlds'' effect, at no extra cost to the program/programmer. Sorry Dave, but that is just not true. You get edge vectors only if you declare the structure as having edgevectors. If you declare a multidimensional array you get the conventional contiguous chunk of memory and addressing polynomials to access it. Are you sure you aren't getting confused with B (and BCPL) where edgevectors was the only choice? Alan Bowler Product Support Software Development Group University of Waterloo