Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Odd idea...
#1
I had the most bizarre idea the other day...

What if you made a program's main loop a recursive function? If you did, then you wouldn't have to worry about loop structures or anything of the sort.

Of course, there's probably quite a few problems with this (I tried it in FB with SUBs, and it crashed after a few seconds- probably some stack thing), but think about how much simpler main loops would be if we used recursive functions for them!

Just a thought.
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#2
you could always just do a GOTO with a label.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
you both are funny, thegrogen you might want to have a look into functional languages (ml, haskell )
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#4
I did that in DOS with a GUI I was playing with. It does work, however it gets unstable and choppy. I had mouse and keyboard commands everywhere because otherwise the main functions would take too long and control would not be practical.

My internet connection is so slow at the moment, I typed this in before IE could display the ASCII characters on the screen properly. Heh. Damn phone line noise.

>anarky
Screwing with your reality since 1998.
Reply
#5
You need to get broadband... It's apparently cheaper than dial-up in some places.
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#6
It's coming. 39 days from the time of posting. :bounce: Broadband is not cheaper than dialup by far - not here anyway. Taking into account the average usage and call costs, which are all fixed rate local call connections from anywhere in the country.

>anarky
Screwing with your reality since 1998.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)