Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28613 Discussions

Problem in copiling due to "Call systemqq"

atulnshukla
Beginner
342 Views
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?
0 Kudos
1 Reply
DavidWhite
Valued Contributor II
342 Views
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

0 Kudos
Reply