Question

In the following fortran77 code, there is this subroutine definition

  SUBROUTINE MSIRNS ( D , NOBST , N , X , R , RR , SURFT ,
 ,                    INOBSI , ISUR , IDELTS , IRELPS ,
 ,                    RNOBSI , RSUR , RDELTS , RRELPS ,
 ,                    OBSD , * , * )

what is the meaning of the two last arguments, asterisks?

and how can I therefore call the function?

I tried all these variants

RES = CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD, *, *)
    CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD, *, *)
    RES = CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD)

but always get

Error: Syntax error in argument list at (1)

Was it helpful?

Solution

It's an alternate return specifier:

http://www.fortran.com/F77_std/rjcnf0001-sh-15.html#sh-15.8.3

In the code that calls MSIRNS(), you need to replace the asterisks with "*N", where N is the label of the alternate return line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top