1 / 8
Nov 2009

Sorry to crosspost, but I guess the post I just wrote in some other thread does really belong here:

viewtopic.php?f=5&t=4415&p=14687#p14687

===============================

Hi,

came back to SPOJ after I saw that the Fotran compiler had been updated to gfortran 4.3.2, but I see that Fortran 95 is still not accepted. I think the problem is just that the submitted file is copied as having .f extension, in which case gfortran will treat it as a Fortran 77 file. I guess the solution is just to keep the extension of the submitted file, so those programmers writing F77 code can submit a .f file, and those of us using Fortran90/95 can submit a .f90 file and not get compilation errors.

Cheers,
Ángel

  • created

    Nov '09
  • last reply

    Sep '16
  • 7

    replies

  • 1.2k

    views

  • 3

    users

  • 2

    links

7 months later

Hi again,

I know that Fortran is not very popular, but I decided to give it a try after a few months, and this is still not working...

Any chance of fixing it?

Cheers,
Ángel de Vicente

1 month later
6 years later

I don't get to work Fortran recursive functions (included in Fortran 90), I have declared as it but it throws a compilation error

Completely forgot about this, but you e-mail made me try it again. No problems here compiling and running with recursive functions. What error do you get?

Well, I don't know what you submitted. I tried the following for problem 1, compiles OK and gets accepted, so it looks like at least in principle recursive procedures are OK now. I will let you know if I try something more exciting these days.

PROGRAM p1
IMPLICIT NONE
INTEGER :: i
CALL process()

CONTAINS

RECURSIVE SUBROUTINE process()
READ*, i
IF (i .EQ. 42) STOP
PRINT*, i
CALL process()
END SUBROUTINE process

END PROGRAM p1