It's not a secret anymore!*
The moose likes Java in General and the fly likes what is the correct translation of this ALGOL 60 code to Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "what is the correct translation of this ALGOL 60 code to Java?" Watch "what is the correct translation of this ALGOL 60 code to Java?" New topic
Author

what is the correct translation of this ALGOL 60 code to Java?

Ravi Shankarappa
Ranch Hand

Joined: Jan 09, 2010
Posts: 55
Here is the ALGOL 60 code:



Is the following translation correct?



In particular, I want to know if the code lr = shift + lr should be placed before a[lr]= x ?

Thanks in advance

-Ravi
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11153
    
  16

The best way to find out if it is correct is to test it...so what happens when you do that? Do you get the right answer?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Or you could read the Algol 60 spec... I googled up a copy which you can see here: http://www.brinckerhoff.org/clements/csc530-sp09/Readings/naur-1963.pdf. It describes how a for statement works in enough detail to answer the question.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is the correct translation of this ALGOL 60 code to Java?
 
Similar Threads
Help correcting a button behavior in swing
MultiDimenaional Array sort
Boolean value not changing
Iteration using Newton Raphson's method
Processing with two JComboBox's in one JPanel/JFrame