why doesn't this compile ?



I am cleaning up my directory with test and example programs, and I came
across the following testprogram that I've written somewhere in the past:

http://www.cs.kuleuven.ac.be/~bartv/downloads/test_array_arguments.f95

I guess I wanted to demonstrate to myself how to write a function that
can act on arrays of both rank 1 and rank 2, but unfortunately this
thing doesn't compile anymore.

If i compile it with my F-compiler I get:

Error: test_array_arguments.f95, line 39: F_2 declared as an array in host but is a procedure
detected at FUNCTION@F_2
Error: test_array_arguments.f95, line 39: Attribute set for FUNCTION F_2 which has RESULT Y
detected at FUNCTION@F_2
Error: test_array_arguments.f95, line 42: Duplicate type declaration for Y
detected at ::@Y
Error: test_array_arguments.f95, line 42: Array dimensions already specified for Y
detected at ::@Y
Error: test_array_arguments.f95, line 50: Duplicate subprogram name F_1
detected at FUNCTION@F_1
Error: test_array_arguments.f95, line 50: Attribute set for FUNCTION F_1 which has RESULT Y
detected at FUNCTION@F_1
Error: test_array_arguments.f95, line 53: Duplicate type declaration for Y
detected at ::@Y


I've been playing around, but could not get it to compile yet... I've been
staring for too long at it and now it's probably too late in the evening ;-)
Does anybody see what I'm doing wrong?

Regards,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages

  • Re: why doesnt this compile ?
    ... > can act on arrays of both rank 1 and rank 2, ... > thing doesn't compile anymore. ... function to the caller, which is a nice feature of generics, but on ... To me an elemental function would be "a function that can act on arrays ...
    (comp.lang.fortran)
  • Re: using system to echo "hello world" gives SystemStackError
    ... > I don't know anything about compile. ... thufir@arrakis:~/sun_tutorial$ cat build.rb ... puts "cleaning all class files..." ...
    (comp.lang.ruby)
  • Re: Makefile question
    ... is to simply put all related the cpp files after the colon and compile ... And, if I run "make testprogram" again, then ... I am using emacs and the running the compile command "make ... next invocation of make runs with all the .cpp files you need. ...
    (comp.unix.programmer)
  • Re: Makefile question
    ... is to simply put all related the cpp files after the colon and compile ... And, if I run "make testprogram" again, then ... I am using emacs and the running the compile command "make ...
    (comp.unix.programmer)