Diagnostic label identifying a region of source text.
A label highlights a specific character range within a source line and may carry an explanatory message. Labels are used to produce compiler-style diagnostics similar to those of rustc or clang.
Labels may be primary or secondary:
Primary labels determine the source location shown in the diagnostic header and are rendered using '^' markers.
Secondary labels are rendered using '-' markers and provide supplementary context.
first <= position < finish
where finish is exclusive.
Initializes a new instance of the label_type class Constructor
| [in] | text | Text displayed next to the label |
| [in] | first | Position of the label |
| [in] | length | Length of the label |
| [in] | level | (optional) Level of the label |
Examples
Constructor
| [in] | line | line number for the label |
| [in] | text | Text displayed next to the label |
| [in] | first | Position of the label |
| [in] | length | Length of the label |
| [in] | level | (optional) Level of the label |
| [in] | primary | .true. if the label is the primary one |
Examples
Definition at line 304 of file logging.f90.
Variables | |
| integer, allocatable | level |
| Level of message. | |
| logical | primary |
| Primary message. | |
| integer | line |
| Line number of message. | |
| integer | first |
| First character of message. | |
| integer | finish |
| Last character of message. | |
| character(:), allocatable | text |
| Message text. | |