Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Example: AutoPlay Media Studio 5.0 & Recursion

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Example: AutoPlay Media Studio 5.0 & Recursion

    This example shows the power of AutoPlay Media Studio with a well known recursive-function (calculating a fibonacci sequence).

    'Plop' the code below into any event on your project, and watch it fly! (Just don't use a number too high).

    Code:
    function fibonacci (nNumber)
    	if nNumber <= 2 then
    		return 1;
    	else
    		return fibonacci(nNumber-1) + fibonacci(nNumber-2);
    	end
    end
    
    
    input_number = String.ToNumber(Dialog.Input("Fibonacci Input", "Please enter the fibonacci number you want", "", MB_ICONQUESTION));
    
    
    Dialog.Message("", fibonacci(input_number));
    This is just a simple example, but with recursion in the mix, the possibilities for new and exciting projects just increased exponentially!

  • #2
    I grabbed a carbonara down at Fibonacci's the other night, it was great but the bill was like 2 to the power of 4 times 3 squared so I didn't know what to tip. I ended up just giving them my wallet. :o

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment

    Working...
    X