Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!jb3o+ From: jb3o+@andrew.cmu.edu (Jon Allen Boone) Newsgroups: alt.religion.computers Subject: Re: Shoulds arrays start at zero or one? Message-ID: Date: 17 Jan 90 09:30:47 GMT References: <5487@udccvax1.acs.udel.EDU>, <252@usblues.UUCP> Distribution: na Organization: Class of '92, Carnegie Mellon, Pittsburgh, PA Lines: 50 In-Reply-To: <252@usblues.UUCP> tom@usblues.UUCP (Tom Markson) writes: > In article <5487@udccvax1.acs.udel.EDU> cygnus@vax1.acs.udel.EDU (Marc Cygnus) writes: > > now why in HELL would you want to do that? if it's in C, leave it for > > heaven's sake. if it's in pascal, the algorithm had to be broke too badly > > to make it worth _translating_, so rewrite it! or better yet, if you do > > these kinds of mindless things on a regular basis (and you haven't heard > > of _cross-linking_), write a sed (or perl, or C, or *shudder* pascal) > > programme to convert for you, so you just have to touch up things here > > and there. > > You are a truly stupid person. Aside from the obvious flame involved, what is wrong with his suggestion? It's SOP for a lot of different programmers. Why do you think people are always asking for Pascal->C or C->Pascal or Fortran->C conversions on alt.sources.wanted? > You are wrong; Pascal allows the programmer to specify the upper and lower > bounds of the array. You don't know much Pascal either. Yes, that was one of the reasons i really liked Pascal - i especially love referencing arrays that are indexed by Days of the Week. > Pascal does the pointer manipulations for you. In pascal, if I wish to change > a "val" parameter to a reference variable all I must do is add var to it's > declaration. In C, I must recode every single occurance of that variable in > the func to a pointer. (from variable to *variable). In short, C places the > burden on the programmer. You are partially correct. C does leave a lot more to the programmer in a tradeof on performance which i like a lot. However, C provides these neat things like Macros and header files which alleviate your having to go in and change 4 million references and just change one - something i never learned how to do in pascal, if it's even possible. All in all, i like C better than Pascal, though i would like to be able to run indices from any enumerated type. > That explains everything. I've never take a compiler design course, yet i still can follow your messages (as well as catching a few misrepresentations on your part!) I don't see how that explains anything! Oh, you mean that was another pointless flame? Sorry...my mistake... > -- > Tom Markson > ...!uunet!usblues!tom > ...!cbmvax!amix!blekko!usblues!tom - iain