[Prev][Next][Index]

Bugs in "!" comments



Hi,

I have noticed some serious bugs in Sage++ regarding "!" comments
(Fortran 90 style):

	1) Comments at the end of the line are moved to
	   the beginning, when the program in umparsed.
	   Example:

		X = 0	! initialize X

	   becomes:

		! initialize X  X = 0

	I worked around this by writing a pass that forces a "\n"
	at the end of a comment, but this is not ideal, of course.

	2) To create a comment line with "!" comments, the "!" must
	appear in the first 6 columns, or the parser gets confused.

	Once, a whole subroutine disappeared because there was
	a "!" comment line with the "!" in column 8 before the
	subroutine name!!!

	3) The parser gets confused if "!" comments are used
	between continuation lines:

		call	sub(x,y,	! first two parameters
	     .  	    z)		! last parameter

Thanks - Jose Moreira