comp.lang.ada
 help / color / mirror / Atom feed
From: Ole-Hjalmar Kristensen <ohk@clustra.com>
Subject: Re: Ada Queue
Date: 2000/04/07
Date: 2000-04-07T00:00:00+00:00	[thread overview]
Message-ID: <umqvh1uiccs.fsf@gong2.clustra.com> (raw)
In-Reply-To: 38ecf9a2@news.hamilton.edu

"Joseph T" <thisthat7@hotmail.com> 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 <robert_dewar@my-deja.com> wrote:
> >In article <38ecc752@news.hamilton.edu>,
> >  "Joseph T" <thisthat7@hotmail.com> 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




  reply	other threads:[~2000-04-07  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-06  0:00 Ada Queue Joseph T.
2000-04-06  0:00 ` Ted Dennison
2000-04-06  0:00   ` Joseph T
2000-04-06  0:00     ` Ted Dennison
2000-04-06  0:00       ` Joseph T.
2000-04-07  0:00         ` Ted Dennison
2000-04-07  0:00           ` Hyman Rosen
2000-04-07  0:00         ` Ole-Hjalmar Kristensen
2000-04-07  0:00           ` Joseph T
2000-04-07  0:00             ` Ted Dennison
2000-04-06  0:00     ` Robert Dewar
2000-04-06  0:00       ` Joseph T
2000-04-07  0:00         ` Ole-Hjalmar Kristensen [this message]
2000-04-06  0:00       ` Ted Dennison
2000-04-06  0:00     ` tmoran
2000-04-08  0:00       ` tmoran
2000-04-07  0:00 ` MaggieJohn
2000-04-07  0:00   ` Ted Dennison
2000-04-07  0:00 ` Simon Wright
2000-04-09  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox