Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recursion
#1
Excuse the n00b question, but is FB able to do recursion deeper than qb?
am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
Reply
#2
Sure. By default the stack size is 1 Mb. In QB it was 64 Kb. So you do the math Wink
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
Somewhere V1ctor wrote that the default stack size is 1Mb, so probably you can have in FB a lot more recursion than in QB. Just try...
Antoni
Reply
#4
i'll write a dumb test later(just a proc that does some wasteful calculations, displays the current depth, till it eventually screws up with an error message)
am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
Reply
#5
Just try this:

Code:
Declare Sub killStack (recursionDepth%)

killStack 0

Sub KillStack (recursionDepth%)
   Print recursionDepth%
   KillStack (recursionDepth% + 1)
End Sub
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#6
Quote:Just try this:

Code:
Declare Sub killStack (recursionDepth%)

killStack 0

Sub KillStack (recursionDepth%)
   Print recursionDepth%
   KillStack (recursionDepth% + 1)
End Sub
I had 37381.
With the compiler switch -t I switched the stack to 10mb and got 373985.
Reply
#7
I think it's far enough :o Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#8
Recursive floodfill, anyone? Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#9
Is there any other way to do flood fill? Besides maybe a modified a* algorithm.....
am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
Reply
#10
i made an a* once *thinks back to challenge*

yeah i once made a flood fill i think.... i dont remember though

edit: i shoul dprobly describe it =P


it goes around (up until end, right until end, etc) and in a dead end backtracks untill it can move.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)