From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f32236e7e55b02e0 X-Google-Attributes: gid103376,public From: Ole-Hjalmar Kristensen Subject: Re: Ada Queue Date: 2000/04/07 Message-ID: #1/1 X-Deja-AN: 607901585 Sender: ohk@gong2.clustra.com References: <38eca724@news.hamilton.edu> <8ciesn$4mt$1@nnrp1.deja.com> <38ecc752@news.hamilton.edu> <8cikl8$anh$1@nnrp1.deja.com> <38ecf9a2@news.hamilton.edu> X-Complaints-To: abuse@telia.no X-Trace: news.telia.no 955093491 195.204.160.194 (Fri, 07 Apr 2000 09:44:51 CEST) Organization: Telia Internet Public Access NNTP-Posting-Date: Fri, 07 Apr 2000 09:44:51 CEST Newsgroups: comp.lang.ada Date: 2000-04-07T00:00:00+00:00 List-Id: "Joseph T" writes: > Perhaps I should have been clearer. I created the ADA code based on the C > function found at the link I mentioned. I would like to know why the author > would have chosen the methodology used. I'm hoping someone can explain why > it was done the way it was done. > If it was C, the answer is easy. All parameters are passed by value, so this variable is just a local variable which has been assigned an initial value. The original variable will never be changed. So there's really no point in declaring an extra variable. > Robert Dewar wrote: > >In article <38ecc752@news.hamilton.edu>, > > "Joseph T" wrote: > >> > >> I need to explain why I chose to iterate through using the > >variable that was > >> passed instead of the temporary variable. The only thing I > >can think of > >> is that I tried it and it worked. Trial and error. Perhaps > >it's not as > >> efficient, or logical, or conventional..but it really doesn't > >make a difference > >> as long as the proper variable of the queue is returned. > >> > >> I was wondering if any one could shed some light as to another > >reason this > >> solution works well, or why someone might choose it. > >> > >> Thank you so much for helping. > > > > > >This is completely bizarre, I can imagine someone being given > >this as an excercise, but if you wrote it, surely you can > >answer your own question here??? > > > >Please be clearer about what you are asking. > > > >It sounds like > > > >I have written this code > >can anyone tell me why I wrote it this way > > > > > >Sent via Deja.com http://www.deja.com/ > >Before you buy. > -- E pluribus Unix