comp.lang.ada
 help / color / mirror / Atom feed
* Re: Problem with operator "<"
       [not found]         ` <39C3A4A8.9ED2F23F@swbell.net>
@ 2000-09-17  0:00           ` Shawn M. Root
  2000-09-18  0:00           ` Mathias Dolidon
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn M. Root @ 2000-09-17  0:00 UTC (permalink / raw)



"John Magness" <jmagness@swbell.net> wrote in message
news:39C3A4A8.9ED2F23F@swbell.net...
>
>
> Mathias Dolidon wrote:
>
> > > My two cents --  the line :  if Left(i) < Right(i) then  appears
to be
> > > comparing the same element of the array.
> > > This line should never test true.
> >
> > It isn't the same array. I don't understand what problem you see
here...
>
> Sorry -- my mistake -- it is not the same array.  However it is
still a
> recursive call to the function being declared ("<") is it not?
>
> If the line is changed to "if not (left(i) > right(i)) then " the
recursive
> call would
> be avoided.
> John
>
There is no recursion here. The line if Left(i) < Right(i) then  uses
the "<" operator for whatever type comprises the elements of a
grand_entier.  Also, you might want to think about your solution for
solving the problem.  not (left>right) is not the same as
(left<right).

Shawn M. Root






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with operator "<"
  2000-09-18  0:00           ` Mathias Dolidon
@ 2000-09-18  0:00             ` John Magness
  0 siblings, 0 replies; 3+ messages in thread
From: John Magness @ 2000-09-18  0:00 UTC (permalink / raw)




Mathias Dolidon wrote:

> John Magness a �crit :
> >
> > Mathias Dolidon wrote:
> >
> > > > My two cents --  the line :  if Left(i) < Right(i) then  appears to be
> > > > comparing the same element of the array.
> > > > This line should never test true.
> > >
> > > It isn't the same array. I don't understand what problem you see here...
> >
> > Sorry -- my mistake -- it is not the same array.  However it is still a
> > recursive call to the function being declared ("<") is it not?
> >
> > If the line is changed to "if not (left(i) > right(i)) then " the recursive
> > call would
> > be avoided.
> > John
>
> 'grand_entier' (large integer in french) is composed of integer-type
> elements. So we make a call to the integer '<' comparator. There is no
> recursion.
>
> Pleased to read you,
> Mathias
>
> --
> http://www.mdlabs.ovh.org

You are correct.  The data types are different.  I'm not sure what happened --
my neurons are on vacation.
John





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with operator "<"
       [not found]         ` <39C3A4A8.9ED2F23F@swbell.net>
  2000-09-17  0:00           ` Problem with operator "<" Shawn M. Root
@ 2000-09-18  0:00           ` Mathias Dolidon
  2000-09-18  0:00             ` John Magness
  1 sibling, 1 reply; 3+ messages in thread
From: Mathias Dolidon @ 2000-09-18  0:00 UTC (permalink / raw)


John Magness a �crit :
> 
> Mathias Dolidon wrote:
> 
> > > My two cents --  the line :  if Left(i) < Right(i) then  appears to be
> > > comparing the same element of the array.
> > > This line should never test true.
> >
> > It isn't the same array. I don't understand what problem you see here...
> 
> Sorry -- my mistake -- it is not the same array.  However it is still a
> recursive call to the function being declared ("<") is it not?
> 
> If the line is changed to "if not (left(i) > right(i)) then " the recursive
> call would
> be avoided.
> John


'grand_entier' (large integer in french) is composed of integer-type
elements. So we make a call to the integer '<' comparator. There is no
recursion.

Pleased to read you,
Mathias


-- 
http://www.mdlabs.ovh.org




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-09-18  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <39C12B38.47273C93@netcourrier.com>
     [not found] ` <8prggo$q9k$1@nnrp1.deja.com>
     [not found]   ` <39C25377.E038D6C9@netcourrier.com>
     [not found]     ` <39C2ADEC.10E0B022@swbell.net>
     [not found]       ` <39C36424.C88A764@netcourrier.com>
     [not found]         ` <39C3A4A8.9ED2F23F@swbell.net>
2000-09-17  0:00           ` Problem with operator "<" Shawn M. Root
2000-09-18  0:00           ` Mathias Dolidon
2000-09-18  0:00             ` John Magness

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