Jump to content
Sign in to follow this  
  • entries
    38
  • comments
    87
  • views
    34587

flashisfaction

Sign in to follow this  
Patbert

412 views

Dammit! I should get a flash blocker. someone gave me a link to this cryptic little game. Guaranteed to drive you mad. I got as far as getting the little guy to come out the house on the left and get blown up by a mine.

I've been getting to grips with making parse trees in delphi, and getting used to recursive functions. Recursive functions seem like some sort of black magic to me. I mean this to put out a parse tree in order..


// PRE: True
// POST: Prints parse tree to screen
PROCEDURE Display_Tree_R(Tree:TRecTree);
BEGIN
IF NOT (RecTree.Q_Empty(Tree)) THEN
BEGIN
Display_Tree_R(Get_Left(Tree));
WRITELN(Get_Root(Tree));
Display_Tree_R(Get_Right(Tree));
END;
END;


And not a for loop in sight.
Sign in to follow this  


1 Comment


Recommended Comments

Recursive functions have always scared me. I'm afraid if I use them I'll be sucked into a black hole of recursiveness...

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!