Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: A brief detour....;-)

Re: A brief detour....;-)

From: Yechiel Adar <adar76_at_inter.net.il>
Date: Tue, 09 Dec 2003 07:49:25 -0800
Message-ID: <F001.005D94EA.20031209074925@fatcity.com>


You are bringing up old memories.
I had both PL/1 and assembler (IBM mainframe) in the early 70's.

Yechiel Adar
Mehish
----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com> Sent: Tuesday, December 09, 2003 5:24 PM

> Hate to say this but you are a bit late. I had my students at University
> and here at Compuware create three to four different versions of the
Tower's
> of Hanoi solution in PL/SQL. Used PL/SQL tables, stack processing,
> recursion (yes it can be done), and others. I also had (yep had - lost
> this) one for both PL/I and TSO/CLIST Dialog Manager & VMS DCL. I
actually
> created screens where you could dynamically choose the number of pegs and
> pieces. It also verified that you were putting smaller pieces on top of
> larger ones (one of the core rules for Tof H).
>
> Isn't programming great?
>
> Thank You
>
> Stephen P. Karniotis
> Technical Alliance Manager
> Compuware Corporation
> Direct: (313) 227-4350
> Mobile: (248) 408-2918
> Email: Stephen.Karniotis_at_Compuware.com
> Web: www.compuware.com
>
> -----Original Message-----
> Bobak, Mark
> Sent: Monday, December 08, 2003 4:19 PM
> To: Multiple recipients of list ORACLE-L
> Subject: A brief detour....;-)
>
> So, I saw on SlashDot (http://www.slashdot.org/) a story about a guy who
has
> over 100 different implementations of the Towers of Hanoi solution, each
in
> a different language. Since he didn't have one in PL/SQL, I decided to
> write one.
>
> Here it is:
> create or replace package hanoi
> is
> from_peg constant number := 1;
> to_peg constant number := 3;
> using_peg constant number := 2;
>
> procedure play(n number);
>
> end hanoi;
> /
> create or replace package body hanoi
> is
>
> procedure do_hanoi(n number, from_peg number, to_peg number, using_peg
> number)
> is
> begin
> if(n > 0) then
> do_hanoi(n-1,from_peg, using_peg, to_peg);
> dbms_output.put_line('move '||from_peg||' --> '||to_peg);
> do_hanoi(n-1, using_peg, to_peg, from_peg);
> end if;
> end;
> procedure play(n number)
> is
> begin
> do_hanoi(n, from_peg, to_peg, using_peg);
> end;
> end;
> /
>
> This concludes this public service announcement. We now return you to our
> regularly scheduled programming.
>
> -Mark
>
> PS Yes, it's a slow day....;-)
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Bobak, Mark
> INET: Mark.Bobak_at_il.proquest.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>
>
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
disclose
> it to anyone else. If you received it in error please notify us
immediately
> and then destroy it.
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Karniotis, Stephen
> INET: Stephen_Karniotis_at_compuware.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Yechiel Adar
  INET: adar76_at_inter.net.il

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Dec 09 2003 - 09:49:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US