BEGIN PROLOGUE XERPRN SUBSIDIARY PURPOSE Print error messages processed by XERMSG. LIBRARY SLATEC (XERROR) CATEGORY R3C TYPE ALL (XERPRN-A) KEYWORDS ERROR MESSAGES, PRINTING, XERROR AUTHOR Fong, Kirby, (NMFECC at LLNL) **DESCRIPTION
This routine sends one or more lines to each of the (up to five) logical units to which error messages are to be sent. This routine is called several times by XERMSG, sometimes with a single line to print and sometimes with a (potentially very long) message that may wrap around into multiple lines.
PREFIX Input argument of type CHARACTER. This argument contains characters to be put at the beginning of each line before the body of the message. No more than 16 characters of PREFIX will be used.
NPREF Input argument of type INTEGER. This argument is the number of characters to use from PREFIX. If it is negative, the intrinsic function LEN is used to determine its length. If it is zero, PREFIX is not used. If it exceeds 16 or if LEN(PREFIX) exceeds 16, only the first 16 characters will be used. If NPREF is positive and the length of PREFIX is less than NPREF, a copy of PREFIX extended with blanks to length NPREF will be used.
MESSG Input argument of type CHARACTER. This is the text of a message to be printed. If it is a long message, it will be broken into pieces for printing on multiple lines. Each line will start with the appropriate prefix and be followed by a piece of the message. NWRAP is the number of characters per piece; that is, after each NWRAP characters, we break and start a new line. In addition the characters '$$' embedded in MESSG are a sentinel for a new line. The counting of characters up to NWRAP starts over for each new line. The value of NWRAP typically used by XERMSG is 72 since many older error messages in the SLATEC Library are laid out to rely on wrap-around every 72 characters.
NWRAP Input argument of type INTEGER. This gives the maximum size piece into which to break MESSG for printing on multiple lines. An embedded '$$' ends a line, and the count restarts at the following character. If a line break does not occur on a blank (it would split a word) that word is moved to the next line. Values of NWRAP less than 16 will be treated as 16. Values of NWRAP greater than 132 will be treated as 132. The actual line length will be NPREF + NWRAP after NPREF has been adjusted to fall between 0 and 16 and NWRAP has been adjusted to fall between 16 and 132.
REFERENCES R. E. Jones and D. K. Kahaner, XERROR, the SLATEC Error-handling Package, SAND82-0800, Sandia Laboratories, 1982. ROUTINES CALLED I1MACH, XGETUA REVISION HISTORY (YYMMDD) 880621 DATE WRITTEN 880708 REVISED AFTER THE SLATEC CML SUBCOMMITTEE MEETING OF JUNE 29 AND 30 TO CHANGE THE NAME TO XERPRN AND TO REWORK THE HANDLING OF THE NEW LINE SENTINEL TO BEHAVE LIKE THE SLASH CHARACTER IN FORMAT STATEMENTS. 890706 REVISED WITH THE HELP OF FRED FRITSCH AND REG CLEMENS TO STREAMLINE THE CODING AND FIX A BUG THAT CAUSED EXTRA BLANK LINES TO BE PRINTED. 890721 REVISED TO ADD A NEW FEATURE. A NEGATIVE VALUE OF NPREF CAUSES LEN(PREFIX) TO BE USED AS THE LENGTH. 891013 REVISED TO CORRECT ERROR IN CALCULATING PREFIX LENGTH. 891214 Prologue converted to Version 4.0 format. (WRB) 900510 Added code to break messages between words. (RWC) 920501 Reformatted the REFERENCES section. (WRB) END PROLOGUE XERPRN
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*) | :: | PREFIX | ||||
| integer | :: | NPREF | ||||
| character(len=*) | :: | MESSG | ||||
| integer | :: | NWRAP |