For Programmers: Free Programming Magazines  


Home > Archive > Cobol > August 2007 > Re: How to find the greatest of two numbers without using









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: How to find the greatest of two numbers without using
Frank Swarbrick

2007-08-31, 6:58 pm

>>> On 8/31/2007 at 10:32 AM, in message
<13dggs41m0sc4c@corp.supernews.com>,
Rick Smith<ricksmith@mfi.net> wrote:

> "Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> wrote in message
> news:46D7E17F.6F0F.0085.0@efirstbank.com...
> [snip]
> you
>
> Another intereting approach might be:
> -----
> evaluate
> function ord-max(A B) - function ord-min(A B)
> when 1
> display "A is less than B"
> when 0
> display "A is equal to B"
> when -1
> display "A is greater than B"
> end-evaluate
> -----
>
> A and B may be either numeric or alphanumeric, as long as
> they are the same.


This whole discussion makes me wonder if the OP is trying to win an
"Obfuscated Cobol" contest!

:-)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com