WHERE (....)
.....
ELSEWHERE
....
END WHERE
Blanks are significant in f90 which means that "ELSE WHERE" is not legal.
At least NAG-F90-V2.1 for Linux, aborts if I try. A funny thing is that
the same compiler accepts "ENDWHERE". Am I missing something here or is
this a bug in the NAG compiler?
My other question is why does the standard demand ELSEWHERE instead of
ELSE WHERE?
IMHO: ELSE WHERE would be more consistent with the official IF construct:
IF (...) THEN
.....
ELSE IF (.....)
.....
ELSE
.....
END IF
Jens Helmers,
jen...@marin.unit.no
>According to "Fortran 90 Explaind" the general WHERE construct is:
>
>WHERE (....)
> .....
>ELSEWHERE
> ....
>END WHERE
>
>Blanks are significant in f90 which means that "ELSE WHERE" is not legal.
>At least NAG-F90-V2.1 for Linux, aborts if I try. A funny thing is that
>the same compiler accepts "ENDWHERE". Am I missing something here or is
>this a bug in the NAG compiler?
It's not a bug in the NAG compiler. From the F90 standard:
3.3.1 Free source form
...
One or more blanks must be used to separate certain adjacent keywords
and may be optionally used between others, as follows.
Blanks Optional Blank Mandatory
BLOCK DATA CASE DEFAULT
DOUBLE PRECISION DO WHILE
ELSE IF IMPLICIT type-spec
END BLOCK DATA IMPLICIT NONE
END DO INTERFACE ASSIGNMENT
END FILE INTERFACE OPERATOR
END FUNCTION MODULE PROCEDURE
END IF RECURSIVE FUNCTION
END INTERFACE RECURSIVE SUBROUTINE
END MODULE RECURSIVE type-spec
END PROGRAM type-spec FUNCTION
END SELECT type-spec RECURSIVE
END SUBROUTINE
END TYPE
END WHERE
GO TO
IN OUT
SELECT CASE
>My other question is why does the standard demand ELSEWHERE instead of
>ELSE WHERE?
To be consistent with the English language?
Dan
--
Dan Pop
CERN, CN Division
Email: dan...@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
You don't need the standard to answer this, just an English dictionary:
'elsewhere' is the only spelling of elsewhere. You can of course write
"He went somewhere else, where he found a buttercup."
Regards,
Mike Metcalf
(met...@cern.ch)