Home > Archive > Fortran > June 2007 > CALL and SUBROUTINE Space Issue
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CALL and SUBROUTINE Space Issue
|
|
| coolchick 2007-06-19, 8:06 am |
| Hi All,
I know someone will definitely be able to answer this.
I am using fortran 77
I have created a subroutine and calling it like this:
CALL LOOPPARA( MXFNL, MXNML, MXDPTH, MXFNDR, MXKIDS
: ,MXMKAL, MXMKLC, MXPEO, MX2FND, MX2KID
I get the following error on compile time:
CALL LOOPPARA( MXFNL, MXNML, MXDPTH, MXFNDR,
MXKIDS
^
"simwalk2.f", Line = 20783, Column = 73: ERROR: Unexpected syntax: ","
or ")" was expected but found "EOS".
: ,MXMKAL, MXMKLC, MXPEO, MX2FND, MX2KID
^
"simwalk2.f", Line = 20784, Column = 7: ERROR: This statement must
begin with a label, a keyword, or an identifier.
I am getting the same error where I define the SUBROUTINE. It is
clearly a spacing issue. How do I go about fixing this?
PLease help!
NG
| |
| robert.corbett@sun.com 2007-06-19, 8:06 am |
| On Jun 18, 10:14 pm, chick <naureen.ni...@gmail.com> wrote:
> Hi All,
>
> I know someone will definitely be able to answer this.
> I am using fortran 77
>
> I have created a subroutine and calling it like this:
>
> CALL LOOPPARA( MXFNL, MXNML, MXDPTH, MXFNDR, MXKIDS
> : ,MXMKAL, MXMKLC, MXPEO, MX2FND, MX2KID
>
> I get the following error on compile time:
>
> CALL LOOPPARA( MXFNL, MXNML, MXDPTH, MXFNDR,
> MXKIDS
>
> ^
> "simwalk2.f", Line = 20783, Column = 73: ERROR: Unexpected syntax: ","
> or ")" was expected but found "EOS".
>
> : ,MXMKAL, MXMKLC, MXPEO, MX2FND, MX2KID
> ^
> "simwalk2.f", Line = 20784, Column = 7: ERROR: This statement must
> begin with a label, a keyword, or an identifier.
>
> I am getting the same error where I define the SUBROUTINE. It is
> clearly a spacing issue. How do I go about fixing this?
>
> PLease help!
>
> NG
The message indicates that the compiler does not know what
class of statement it is seeing. My guess is that your
continuation character is in the wrong column. It must
be in column 6.
Bob Corbett
| |
| Terence 2007-06-19, 8:06 am |
| And on my F77 compiler the contination code in column 6 HAS to be a
digit from 1 to 9 only!
| |
| Richard Maine 2007-06-19, 8:06 am |
| Terence <tbwright@cantv.net> wrote:
> And on my F77 compiler the contination code in column 6 HAS to be a
> digit from 1 to 9 only!
Then it is not an F77 compiler. Or for that matter even an f66 compiler.
Per the standard (all of them), any character in the Fortran character
set other than blank or zero is allowed.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
| |
| glen herrmannsfeldt 2007-06-19, 8:06 am |
| chick wrote:
(snip)
> I have created a subroutine and calling it like this:
> CALL LOOPPARA( MXFNL, MXNML, MXDPTH, MXFNDR, MXKIDS
> : ,MXMKAL, MXMKLC, MXPEO, MX2FND, MX2KID
> I get the following error on compile time:
> CALL LOOPPARA( MXFNL, MXNML, MXDPTH, MXFNDR,
> MXKIDS
> ^
> "simwalk2.f", Line = 20783, Column = 73: ERROR: Unexpected syntax: ","
> or ")" was expected but found "EOS".
The : should be in column 6 is a continuation indicator. Since it is
in column 7, the compiler is considering it as two statements, the
first ending where it shouldn't, and the second beginning with a
colon.
For Fortran 77 (snipped from the OP) columns 1 through 5 are for the
statement number, if any, or C in column 1 for comments. Column 6
indicates that the line is a continuation of the previous line.
The rest should be between column 7 and 72 of each line.
-- glen
| |
| coolchick 2007-06-19, 7:09 pm |
| Thank you so much.
It is now working for me.
NG
On Jun 19, 4:49 am, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> chick wrote:
>
> (snip)
>
>
> The : should be in column 6 is a continuation indicator. Since it is
> in column 7, the compiler is considering it as two statements, the
> first ending where it shouldn't, and the second beginning with a
> colon.
>
> For Fortran 77 (snipped from the OP) columns 1 through 5 are for the
> statement number, if any, or C in column 1 for comments. Column 6
> indicates that the line is a continuation of the previous line.
> The rest should be between column 7 and 72 of each line.
>
> -- glen
|
|
|
|
|