Re: "enddo" vs "end do" in do control structures



Erik Toussaint wrote in message <4d5d1665$0$805$58c7af7e@xxxxxxxxxxxxxxxxx>...
On 17-2-2011 13:20, Jay Vee wrote:
Dear Fortran gurus

I am relatively new to the language and noticed in a lot of literature
the terms "end do" and "enddo" are used (apparently) interchangeably.

What is the signifigance of the two forms, are they different? If so,
is there a historical reason for the distinction and which is the more
correct or appropriate to use?

Regards
JV

N1830.pdf (the final draft of the Fortran 2008 standard) mentions the
following in section 3.3.2.2 Blank characters in free form, paragraph 3:

"One or more blanks shall be used to separate adjacent keywords except
in the following cases, where blanks are optional:

BLOCK DATA
END INTERFACE
DOUBLE PRECISION
END MODULE
ELSE IF
END PROCEDURE
ELSE WHERE
END PROGRAM
END ASSOCIATE
END SELECT
END BLOCK
END SUBMODULE
END BLOCK DATA
END SUBROUTINE
END CRITICAL
END TYPE
END DO
END WHERE
END ENUM
GO TO
END FILE
IN OUT
END FORALL
SELECT CASE
END FUNCTION
SELECT TYPE
END IF"


The words are more readable when a blank is present.

And it mentions the following in section 3.3.3.1 on fixed source form,
paragraph 2:

"Except in a character context, blanks are insigni cant and may be used
freely throughout the program."

Fixed source form is error-prone, thus should be avoided.


.