Xref: utzoo comp.lang.modula2:714 comp.lang.misc:1285 Path: utzoo!mnetor!uunet!husc6!uwvax!dogie!uwmcsd1!leah!itsgw!batcomputer!pyramid!prls!mips!uday From: uday@mips.COM (Robert Redford) Newsgroups: comp.lang.modula2,comp.lang.misc Subject: Re: 0-based/1-based arrays Message-ID: <1915@mips.mips.COM> Date: 22 Mar 88 08:36:48 GMT References: <7161@sol.ARPA> <2740@mmintl.UUCP> <4343@june.cs.washington.edu> <6276@ames.arpa> Lines: 27 In article <6276@ames.arpa>, eugene@pioneer.arpa (Eugene N. Miya) writes: > In article <1886@gumby.mips.COM> uday@mips.COM (Uday Kurkure) writes: > > In Mathematics, zero means nothing, void. In computer science, zero > > has a meaning depending on the the context. There exists a memory location > > at zero address. As long as there are addresses starting from zero, 0-based/ > > 1-based arrays would be a matter of taste. > > Sorry, nope. Zero is a place holder, the additive identity, it does not > mean void, etc. This is why the null set, $phi$, and {} were created > by Cantor(?). Zero based starts are excellent for initial conditions, > and negative subscripts are useful on occasion. Sorry for using the terms nothing, void rather loosely. My statement was based on the very common, day to day interpretation given to zero. ( i.e. cardinality of a null set ) When someone has zero apples, it means that he has no apples. If there are three apples on the table, one would start refering to them as first apple, second apple, third apple. If there are 3 memory cells in the computer, one starts refering to them as zeroth memory cell, first memory cell and second memory cell. ..Uday