Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's basically a switch statement, but without the benefit of descriptive case identifiers. So it's basically,

  switch (I-20) {
  case 21:
  case 22:
    ...
  }
but you have to imagine "21" as the string identifier, not the integer value. `I-20` is indexing the list of labels in the GOTO statement.

The earlier column beginning with

  GOTO (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) I
is easier to read

  switch (I) {
  case 1:
     ...
  case 2:
     ...
  }
because the integer value of I, the string labels, and their index in the list are all the same.

I've never written Fortran. I did learn to program using TI-85 BASIC, though, and am well versed in C. The GOTO in the Fortran code is possibly the easiest part for me to understand.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: