This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Syntax in AD book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Syntax in AD book" Watch "Syntax in AD book" New topic

Syntax in AD book

Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Good day to everyone !

As suggested by the FAQ itself, I began reading the Algorithms pdf that's uploaded in this site, and so far it has been very illustrative, until I reached a pseudo-code that confused me.

Could someone please explain to me this pseudo-code? well, I'm not that lost, The part I'm confused about is the one that's inside the parentheses next to the DO.

I will attach an image just in case someone is wondering how it's displayed in the book itself.

It'd be really nice If someone provided the Java code for this pseudo-code.!

Thank you very, very much in advance!



[Thumbnail for pseudo.jpg]

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
The notation is very similar to the programming languages Pascal, Modula and Oberon, so a syntax guide for any of those languages will help you get through the book.

That's not code within the parentheses, it's a comment - everything within "(*" and "*)" is.
Jose Campana
Ranch Hand

Joined: May 28, 2007
Posts: 339
Ulf !

Thank you very much ! It's obvious I didn't take the time to look into those "Legacy" languages. And for a second I thought those were pointers there, like C++ or something.
Anyways, good to know how those comments work in that language, Thanks for the tip.

You're awesome as always Ulf.

Hey, can you recommend a guide to quickly review the syntax of that/those language(s) ?

Best Regards,

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45346
That method looks like the recursive power method which runs in logarithmic time.
Don't get me started about those stupid light bulbs.
subject: Syntax in AD book
It's not a secret anymore!