Xref: utzoo comp.lang.modula2:668 comp.lang.misc:1119 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!ll-xn!mit-eddie!uw-beaver!uw-june!pattis From: pattis@june.cs.washington.edu (Richard Pattis) Newsgroups: comp.lang.modula2,comp.lang.misc Subject: 0-based/1-based arrays Message-ID: <4343@june.cs.washington.edu> Date: 2 Mar 88 18:14:51 GMT References: <7161@sol.ARPA> <2740@mmintl.UUCP> Organization: U of Washington, Computer Science, Seattle Lines: 7 Summary: A concrete reason to prefer one over the other I too detest 0-based arrays (and think 1-based arrays are better). In trying to rationalize this choice, I came up the the following argument: When we process arrays, we often need to know the size of the array and/or the position of the last element. In 0-based arrays, these quantites are off by one; in 1-based arrays they are the same. Hence, I think that people will make fewer errors with 1-based arrays. Rich Pattis