• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Syntax in AD book

 
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 76888
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That method looks like the recursive power method which runs in logarithmic time.
 
mooooooo ..... tiny ad ....
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic