FORTRAN 77 Language Reference

Apostrophe Editing ('aaa')

The apostrophe edit specifier is in the form of a character constant. It causes characters to be written from the enclosed characters of the edit specifier itself, including blanks. An apostrophe edit specifier must not be used on input. The width of the field is the number of characters contained in, but not including, the delimiting apostrophes. Within the field, two consecutive apostrophes with no intervening blanks are counted as a single apostrophe. You can use quotes in a similar way.

Example: apos.f, apostrophe edit (two equivalent ways):


	WRITE( *, 1 ) 
1	FORMAT( 'This is an apostrophe ''.') 
	WRITE( *, 2 ) 
2	FORMAT( "This is an apostrophe '.") 
	END

The above program writes this message twice: This is an apostrophe '.