- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to copile one old code with intel visual fortran 9.1 compiler using microsoft visual studio 2003. The problem that i am facing is that in the code SystemQQ is used as a subrotine and is called using following statement:
Call Systemqq(.......)
when i try to compile, compiler throws the error that this is a function and should not be used as a subroutine. i checked a lot of documentations, but i am not able to resolve this issue.
there are people who say that say that it's a working code. Am i missing any compiler option that needs to be set in order to get this code working?
I am trying to copile one old code with intel visual fortran 9.1 compiler using microsoft visual studio 2003. The problem that i am facing is that in the code SystemQQ is used as a subrotine and is called using following statement:
Call Systemqq(.......)
when i try to compile, compiler throws the error that this is a function and should not be used as a subroutine. i checked a lot of documentations, but i am not able to resolve this issue.
there are people who say that say that it's a working code. Am i missing any compiler option that needs to be set in order to get this code working?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Systemqq is a function, with the call
result = SYSTEMQQ (commandline)
where result is a Logical returning .TRUE. or .FALSE. depending on whether the call is successful.
Apparently gfortran allows the SYSTEM routine to be called as either a subroutine or a function, but it is not normal to permit this (The Fortran standard probably prohibits it).
You need to change your code to call SYSTEMQQ as a function as shown above.
David
result = SYSTEMQQ (commandline)
where result is a Logical returning .TRUE. or .FALSE. depending on whether the call is successful.
Apparently gfortran allows the SYSTEM routine to be called as either a subroutine or a function, but it is not normal to permit this (The Fortran standard probably prohibits it).
You need to change your code to call SYSTEMQQ as a function as shown above.
David
![](/skins/images/3344F5B3B76C91485ED0E980FD0CA95E/responsive_peak/images/icon_anonymous_message.png)
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