in reply to printing comments with write and format

I'm not sure how to put a pound sign in the format directly, but you can just put it as your first "field" in the format:
format Comment = @ @<<<<<<<<<<<<<<<<<<<<<<<<< "#", "This line is a comment." .