Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
fassert.F90
Go to the documentation of this file.
1 @brief c - like assert implementation for fortran.
2 module assert
3 
4  implicit none
5 
6 contains
7 
10  subroutine assertion(cond, file, line)
11  character(len=*), intent(in) :: cond
12  character(len=*), intent(in) :: file
13  integer, intent(in) :: line
14  character(len=6) :: line_str
15  write (line_str, '(i6)') line
16  write (*, '(a, a, a, a, a, a)') file, ":", trim(adjustl(line_str)), ": Assertion `", cond, "' failed."
17  write (*, '(a)') "Aborted"
18  stop 1
19  end subroutine assertion
20 
21 end module assert
subroutine assertion(cond, file, line)
Assertion routine designed to mimick the behavior of C's 'assert' from 'assert.h'....
Definition: fassert.F90:11
    Report Typos and Errors