Loading...
Searching...
No Matches
context

Definition

Source location and content snapshot for precise diagnostics Instances of this type are created for every source file (including nested include files) and passed along with every warning, error, note, or info message to provide accurate line numbers, file names, and code snippets.

Examples

type(context) :: ctx
ctx = context('lorem ipsum', __line__, 'myfile.f90')
...

Remarks

  • Usually one context exists per currently processed file.
  • When entering an #include, a new context is created for the included file.
  • Helps produce high-quality, IDE-friendly error messages.

Constructors

Initializes a new instance of the context class

context(character(*), integer, character(*))

type(context) function context(character(*) content, integer line, character(*) path) 
Parameters
[in]contentThe actual line of source code where the issue occurred
[in]line1-based line number in the current file
[in]pathFull absolute or relative path to the file
Returns
The constructed datetime object.

Remarks

Definition at line 99 of file context.f90.


The documentation for this type was generated from the following file: