Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Recursive functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 14 May 2010 :  09:41:50  Show Profile  Reply with Quote
Anyone here have experience using recursive functions in ASP?

It's basically a function that calls itself, each time sending different values. So it's like a loop.

I am assisting someone here with a file upload mod and ran across the function calling itself to look through the folders and subfolders.

It's the first I have run into recursive functions in my years of coding so it's a little hard to grasp.

I am hoping one can replace this function with a loop?

Support Snitz Forums

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 May 2010 :  10:22:34  Show Profile  Reply with Quote
Recursiveness can't always be handled with a loop, at least not as easily. The difference is that in each fucntion call you are, in fact, providing a new context, so recursive functions are a neat way to handle complexity. Going recursively through folders is such a situation...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 May 2010 :  11:12:05  Show Profile  Reply with Quote
I use them pretty extensively in JavaScript but don't think I've ever had need to use them in ASP. Now I know they're possible, though, I'm sure I'll find some use for them!


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20611 Posts

Posted - 14 May 2010 :  12:16:23  Show Profile  Visit HuwR's Homepage  Reply with Quote
I use recursive functions all the time in .net and most other languages for that matter, they are generally the best way to accomplish complex iterative processes especially when the structures are tree like in nature

MVC .net dev/test site | Snitz .NET Core running on Raspberry Pi

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 14 May 2010 :  17:17:33  Show Profile  Reply with Quote
Wow. Ok. 10 years coding and never run into recursive functions. But then again, Snitz Forums has been my teacher. lol

Support Snitz Forums
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.65 seconds. Powered By: Snitz Forums 2000 Version 3.4.07