So I have this Fortran code:
xo = xo + delta
no = no + nx
mo = mo + mx
Ro = Ro + Rx
R1o = R1o + R1x
Po = Po + Px
Mso = Mso + Msx
Mbo = Mbo + Mbx
i = i + 1
if(i.eq.50000*int(i/50000)) then
print*,'i= ',i,'; Log10(Radio)= ',Log10(Radio),'; P= ',Po,
1 '; Masa= ',Mso
print*, '-g_tt = ', no, '; g_rr = ', mo
print*, 'g_tt*g_rr= ', no*mo !*.299151515d0
print*, 'no_central = ', 1.d0/no
print*, 'Escalar de curvatura: R = ', Ro
print*, 'denominador = ', 2.d0*f1o+xo*R1o*f2o,' R1 = ', R1o
print*, 'R1²f2²/f1 = ', R1o**2.d0*f2o**2.d0/f1o
print*, 'f/f2 = ', fo/f2o,' f1R/f2 = ', f1o*Ro/f2o
print*, 'f3R²/f2 = ', f3o*Ro**2.d0/f2o
print*, 'Error de R = ',error_R
print*, 'Radio = ', xo
print*, '----------------------------------------------------'
endif
Enddo
no_central=1.d0/no
END
and I’m trying to write it out in Python.
First of all, I’m not sure what the index “i” is doing because it’s never mentioned before. I assumed it was for some kind of “for” loop. is it for the “if” statement? I kind of understand that the first time it’s mentioned in the code it means that it’ll increment by “1”. But aside from that, I have no idea what it does in this part of the code (the only part it’s mentioned in the entire program).
Second: in the line print*,'i= ',i,'; Log10(Radio)= ',Log10(Radio),'; P= ',Po,'; Masa= ',Mso
I don’t understand if the semicolon indicates some kind of “new line” when it’s printed. Does anyone know what it does?
I tried looking for a solution online, but couldn’t find one. I understand that it might not be something difficult (for someone who uses Fortran); but I’m unfamiliar with Fortran.