comp.lang.ada
 help / color / mirror / Atom feed
From: Pae Choi <cpa@neosoft.com>
Subject: Re: 'Money wanted' algorithm (Cobol version)
Date: 1997/01/01
Date: 1997-01-01T00:00:00+00:00	[thread overview]
Message-ID: <32CA4748.6FDF@neosoft.com> (raw)
In-Reply-To: 32C988BA.427D@dynasty.net


Richie Lai wrote:
> 
> Damn.. from psuedo, to pascal.. to i can't even make that out <G>
> 
> #define CUP empty
> #define empty 0
> 
> int main
> (int ense,char *is_stupid[])
> {
>    while (CUP = empty)
>    {
>        for (time = 720; time < 1440 ; time ++)  {
>          siton(street);
>          look(stupid);
>          hopefor(money);
>        }
>     }
> }
> 
> 
> Brad Dale wrote:
> >
> > On Mon, 30 Dec 96 13:54:10 GMT, spam.free.zone@no-spam.com (Doug
> > Miller) wrote:
> >
> > >>>DC> Step 1 Find empty coffee cup
> > >>>DC> Step 2 Find busy Street
> > >>>DC> Step 3 Sit in middle of Street
> > >>>DC> Step 4 goto Step 3 until sun goes down.
> > >>>DC> Stpe 5 goto step 1 in the next day.
> > >>
> > >>>Tsk, tsk, bad advice. Goto's are evil!
> > >>
> > >>>Program Make_Money;
> > >>
> > >>>Uses
> > >>>  Nothing;
> > >>
> > >>>begin
> > >>>  Repeat
> > >>>    Find(EmptyCoffeeCup);
> > >>>    Find(BusyStreet);
> > >>>    Repeat
> > >>>      Sit(MiddleOfStreet)
> > >>>    Until Sun(Down)
> > >>>  Until Hell(FrozenOver)
> > >>>end.
> > >>
> > >>>See mom, I DO have the Christmas spirit!
> > >>
> > >>>   Dennis!
> > >>Hey that's cool can you do it in Cobol?
> > >>
> > >Sure thing:
> > >
> > >PERFORM WITH TEST AFTER UNTIL hell-frozen-over
> > >    PERFORM find-empty-coffee-cup
> > >    PERFORM find-busy-street
> > >    PERFORM sit-middle-of-street UNTIL sunset
> > >    PERFORM wait-til-morning
> > >END-PERFORM
> > >
> >
> > (define get_money
> >    (lambda (status amount_money)
> >        (if ((!= status HELLFROZEN) amount_money)
> >            (+ amount_money
> >                (coffee status amount_money))))))
> >
> > (define coffee
> >    (lambda (status amount_money)
> >        (begin
> >           (1 COFFECAN)
> >           (find_street status amount_money))))
> >
> > (define find_street
> >    (lambda (status amount_money)
> >      (begin
> >         (1 STREET)
> >         (sit_street 0 status amount_money))))
> >
> > (define sit_street
> >    (lambda (time status amount_money)
> >       (if ((= time SUNSET) amount_money)
> >           (+ (+ amount_money PROFIT)
> >               (sit_street (+ 1 time) status amount_money)))))
> >
> > Written sorta in SCHEME, been awhile so don't be to hard on it
> >                         firehawk@ames.net
> 
> --
> =======================================================================
> Richie Lai    Windows NT the only operating
> rla@dynasty.net    system that makes you hit c-a-d
> http://www.sindac.com/richie  to start using it...
> =======================================================================
> 


Hahaha ... I thought this thread was over..... I'm so glad you
guys haven't lost the sense of humors..... hahaha ... Very good
guys. happy new year.



pae




  parent reply	other threads:[~1997-01-01  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-30  0:00 'Money wanted' algorithm (Cobol version) Doug Miller
1996-12-30  0:00 ` Beldraen
1996-12-31  0:00   ` Constantinos A. Kotsokalis
1996-12-30  0:00 ` Renegade
1996-12-30  0:00   ` Bill Haverberg
1996-12-30  0:00   ` 'Money wanted' algorithm (Lisp version) Ken Tilton
1996-12-31  0:00   ` 'Money wanted' algorithm (Cobol version) Bob Jarvis
1996-12-31  0:00     ` Deric Cheng
1996-12-30  0:00 ` Sundial Services
1996-12-31  0:00 ` Brad Dale
     [not found]   ` <32C988BA.427D@dynasty.net>
1997-01-01  0:00     ` Pae Choi [this message]
1996-12-31  0:00 ` Robin Becker
replies disabled

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