- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What is wrong with the following code? It compiles with Intel Fortran 8.1 but not with V 9.0.019.
There I get the error:
"Error: The CALL statement is invoking an external function subprogram as a subroutine. [SYSTEM]"
Regards,
Ingo
--- code ----------------------------------------------------
program HydroSim
implicit none
call Test()
contains
subroutine Test()
use ifport
call system("notepad")
end subroutine
end program
What is wrong with the following code? It compiles with Intel Fortran 8.1 but not with V 9.0.019.
There I get the error:
"Error: The CALL statement is invoking an external function subprogram as a subroutine. [SYSTEM]"
Regards,
Ingo
--- code ----------------------------------------------------
program HydroSim
implicit none
call Test()
contains
subroutine Test()
use ifport
call system("notepad")
end subroutine
end program
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The lib_for.pdf which comes with the compiler specifies that system() is an integer function, which returns an error code. ifport.f90 enforces the standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For a long time, our compiler allowed you to CALL a procedure declared as a function, with certain restrictions. But the restrictions weren't enough to prevent run-time problems and we decided it was the best course to simply enforce the declared procedure type all the time.
Please read the release notes where this and other changes are discussed. You may save yourself surprises by doing so.
Please read the release notes where this and other changes are discussed. You may save yourself surprises by doing so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the clarification.
I wasn't aware that functions could be called as subroutines. I always thought system is a subroutine. Having that background information the error message makes sense.
I wasn't aware that functions could be called as subroutines. I always thought system is a subroutine. Having that background information the error message makes sense.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page