Folks:(adsbygoogle = window.adsbygoogle || []).push({});

I have a FORTRAN program published in Multivariate Morphometrics (Blackith and Reyment - 1971). In this book they list a FORTRAN program that computes Canonical Correlates. I don't have a FORTRAN compiler and I'm trying to translate this program into PERL. The one FORTRAN book that is helping me along is Problem Solving and Structured Programming in Fortran (Friedman and Koffman-1978).

The program has the following statement, which I can't figure out:

a) IF ( IEGEN ) 15 , 10 , 15

b) 10 DO 14 I = 1 , N

c) DO 14 J = 1 , N

d) IF ( I = J ) 12 , 11 , 12

e) 11 U ( I , J ) = 1

f) GO TO 14

g) 12 U ( I , J ) = 0

h) 14 CONTINUE

g) 15 NR = 0 (program code continues on.

I think that I understand line a) in that if IEGEN is -1, 0, +1 it branches to 15 , 10, or 15. The program seems to always enter with the value of 0 and so branches to line b) and builds an array.

But what is the descision metric in line d)? In the IF I = J descision, what is -1 , or 0, or +1?

If I = J the value would be equal to zero? But how does one get -1 or +1 out of this?

Any help for me to understand this statement would be greatly appreciated.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran branching statement confusion

Loading...

Similar Threads for Fortran branching statement |
---|

Fortran Successive Over Relaxation Method in FORTRAN |

If statement for Monte Carlo integration |

C/++/# How to use C++ in studying calculus |

Fortran How to buy Fortran Programming Software Commersial License |

Fortran Fortran for Computational Fluid Dynamics Problems |

**Physics Forums | Science Articles, Homework Help, Discussion**