Results 1 to 3 of 3

Thread: A nice (verbal) example of recursion

Share/Bookmark
  1. #1

    A nice (verbal) example of recursion

    "If you do not know what recursion is, read this sentence - till you understand it"


    ------------------

  2. #2
    thinBasic MVPs ReneMiner's Avatar
    Join Date
    Oct 2012
    Location
    Germany
    Age
    47
    Posts
    1,213
    Blog Entries
    1
    Rep Power
    132


    (10 chars)
    Windows 10 on
    Desktop: Intel Core i5-3330 @3.0 GHz, 8 GB Ram, nVidia GeForce GT630 2 GB
    Laptop: Intel Core i3-4005U @1.7GHz, 8 GB Ram, nVidia GeForce 940M 2 GB


    The limit is Imagination

  3. #3
    Member
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    406
    Rep Power
    49
    "If you do not know what recursion is, read this sentence - till you understand it"
    Oh, Recursion:

    Uses "ui"
    #INCLUDE "abc.inc"

    OpenWindow 640, 480
    SetHandleDC hdc, hwnd

    Sub Main(x, radius, lev As Long)
    Single col = 126 * lev/4
    DrawEllipse x-40, 240, radius*.6, radius*.8, 0, col
    If lev >1 Then
    lev -=1
    Main x - radius/2, radius/2, lev
    Main x + radius/2, radius/2, lev
    EndIf
    End Sub

    Canvas_Clear &hFF0000
    Main 320,-240, 8
    Main 320, 240, 8
    Canvas_Redraw

    While IsWindow(hwnd) And Key(27)=0
    Sleep 10
    Wend
    Canvas_Window End hwnd
    Attached Files Attached Files

Similar Threads

  1. Various types of recursion
    By Petr Schreiber in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 6
    Last Post: 25-05-2010, 06:38
  2. www.searchme.com: this is really nice!
    By ErosOlmi in forum Search engines
    Replies: 4
    Last Post: 11-07-2008, 14:14
  3. The new GP2X - NICE!!!!
    By Michael Hartlef in forum Technology
    Replies: 10
    Last Post: 19-10-2007, 22:41
  4. Nice fractals
    By ErosOlmi in forum Technology
    Replies: 22
    Last Post: 20-07-2007, 23:45
  5. Nice videos
    By ErosOlmi in forum General
    Replies: 2
    Last Post: 20-02-2007, 00:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •