From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_50,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c949,38eaf2ac280788bb X-Google-Attributes: gid10c949,public X-Google-Thread: f6290,38eaf2ac280788bb X-Google-Attributes: gidf6290,public X-Google-Thread: 109fba,38eaf2ac280788bb X-Google-Attributes: gid109fba,public X-Google-Thread: fdb77,38eaf2ac280788bb X-Google-Attributes: gidfdb77,public X-Google-Thread: 103376,38eaf2ac280788bb X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,38eaf2ac280788bb X-Google-Attributes: gid1014db,public X-Google-Thread: 114917,38eaf2ac280788bb X-Google-Attributes: gid114917,public X-Google-Thread: 10d15b,38eaf2ac280788bb X-Google-Attributes: gid10d15b,public From: beldraen@mail.earthlink.net (Beldraen) Subject: Re: 'Money wanted' algorithm (Cobol version) Date: 1996/12/30 Message-ID: <32c7f30a.2066168@news.earthlink.net>#1/1 X-Deja-AN: 206783769 references: <5a8h44$elt@news.inetdirect.net> organization: Earthlink Network, Inc. newsgroups: comp.lang.ada,comp.lang.asm.x86,comp.lang.basic.misc,comp.lang.c,comp.lang.c++,comp.lang.clipper,comp.lang.cobol,comp.lang.java.advocacy,comp.lang.java.api,comp.lang.java.misc,comp.lang.java.programmer,comp.lang.javascript,comp.lang.pascal.borland,comp.lang.pascal.delphi.components.misc,comp.lang.pascal.delphi.databases,comp.lang.pascal.delphi.misc,comp.lang.perl.misc,comp.lang.smalltalk,comp.lang.tcl,comp.mail.eudora.ms-windows,comp.mail.sendmail,comp.multimedia,comp.music.midi,comp.object,com Date: 1996-12-30T00:00:00+00:00 List-Id: spam.free.zone@no-spam.com (Doug Miller) wrote: >>>**>> I need alot of money badly; Could anyone help? >> >>>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 class Make_Money extends java.applet.Applet implements runnable { Thread Body = null; fluid_container CoffeeCup; stellar_mass Sun; public void init() { CoffeCup = new fluid_container("COFFEE"); Sun = new stellar_mass(); } public void start() { if (Sun.Status = Sun.Down) Body == null; if(Body == null) { Body = new Thread(this); Body.start(); Body.goToBusyStreet(); } } public void stop() { Body.goToShelter' Body = null; } public void run() { long time = System.currentTimeMillis(); while (Body!= null) { try { time += delay; Thread.sleep(Math.max(0, time System.currentTimeMillis())); } catch (InterruptedException e) { CoffeeCup.addMoney(); Body.lookGreatful(); Body.getMoreConfortable(); }; if (Sun.Status = Sun.Down) Body == null; repaint(); } } } Bel, the mostly sane... Eagles may fly, but weasles don't get sucked into jet engines.