• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Syntax in AD book

 
Jose Campana
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

Sincerely,

Jose.
pseudo.jpg
[Thumbnail for pseudo.jpg]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,

Jose.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49827
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That method looks like the recursive power method which runs in logarithmic time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic