Re: How to find the greatest of two numbers without using the comparison operators?
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Fri, 31 Aug 2007 09:38:07 -0600
<1188542463.524263.317700@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,On 8/31/2007 at 12:41 AM, in message
Aparajita<aparajita.mohanty@xxxxxxxxx> wrote:
Hi,
I want to find the greatest of two given numbers say 'A' and 'B.
The condition is that I should use the IF clause but not comparison
operators like '<', '>','=' etc.
Is there any other operator in COBOL by which we can compare two
numbers.
Not sure why you need this, but perhaps FUNCTION MAX could give you what you
want?
COMPUTE MAX = FUNCTION MAX(A B)
Well, I guess there's no IF in that.
I guess the POSITIVE usage others have given is the answer.
Frank
.
- Follow-Ups:
- References:
- Prev by Date: Re: OT: Baby Update (final)
- Next by Date: Re: How to find the greatest of two numbers without using thecomparison operators?
- Previous by thread: Re: How to find the greatest of two numbers without using the comparison operators?
- Next by thread: Re: How to find the greatest of two numbers without using thecomparison operators?
- Index(es):