hrivera2014 / Genetic-Algorithms-fortran

3 stars 2 forks source link

cannot compile with gfortran #1

Open Beliavsky opened 1 year ago

Beliavsky commented 1 year ago

gfortran -c -std=legacy ga_14oct10.f

gives

ga_14oct10.f:115:54:

  115 |      + igeneracion,(evaluar(parser(cromo(i))),i=1,40)
      |                                                      1
Error: Syntax error in WRITE statement at (1)
ga_14oct10.f:32:20:

   32 |       real*8 evaluar,comparacion
      |                    1
Error: Return type mismatch of function 'evaluar' at (1) (REAL(8)/REAL(4))
ga_14oct10.f:32:20:

   32 |       real*8 evaluar,comparacion
      |                    1
Error: Return type mismatch of function 'evaluar' at (1) (REAL(8)/REAL(4))
ga_14oct10.f:76:15:

   74 |       do i=1,ipoblacion
      |                                                                        2
   75 |         cromo(i)=''
   76 |         indice(i)=0
      |               1
Warning: Array reference at (1) out of bounds (40 > 2) in loop beginning at (2)
hrivera2014 commented 1 month ago

Thanks, the code now can be compiled with gfortran and the std=legacy is not needed almost for this code, you can follow the little changes with git log.