Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ELSEWHERE not ELSE WHERE

1 view
Skip to first unread message

Jens Helmers

unread,
Feb 16, 1996, 3:00:00 AM2/16/96
to
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?

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

Dan Pop

unread,
Feb 17, 1996, 3:00:00 AM2/17/96
to

>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

Michael METCALF

unread,
Feb 21, 1996, 3:00:00 AM2/21/96
to
In article <o9tlom3...@aqua5.marina.unit.no>, jen...@stud.unit.no says...

>
>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?
>
>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
>


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)


0 new messages