ERRMSG= specifier

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


ERRMSG = variable

The variable must be a scalar Character with default kind; its length should be sufficient to hold any message of interest.

The ERRMSG= specifier is allowed in ALLOCATE and DEALLOCATE statements, and the image control statements CHANGE TEAM, END TEAM, LOCK, SYNC ALL, SYNC IMAGES, SYNC MEMORY and UNLOCK. An ERRMSG= variable in an image control statement is not allowed to be a coindexed object.


The ERRMSG= specifier causes the specified variable to be defined with an explanatory message if an error occurs during execution of the statement (if the variable is too short, the message will be truncated). If no such condition occurs, the variable is unchanged.

Note that if no STAT= specifier appears, the program will be terminated on any error condition; therefore it is necessary to use STAT= together with the ERRMSG= specifier if it is to be useful.


ALLOCATE statement, CHANGE TEAM statement, DEALLOCATE statement, END TEAM statement, EVENT POST statement, EVENT WAIT statement, LOCK statement, STAT= specifier, SYNC ALL statement, SYNC IMAGES statement, SYNC MEMORY statement, UNLOCK statement