scratchpad.F90 Source File


Files dependent on this one

sourcefile~~scratchpad.f90~~AfferentGraph sourcefile~scratchpad.f90 scratchpad.F90 sourcefile~simpleleafgridcomp.f90 SimpleLeafGridComp.F90 sourcefile~simpleleafgridcomp.f90->sourcefile~scratchpad.f90 sourcefile~simpleparentgridcomp.f90 SimpleParentGridComp.F90 sourcefile~simpleparentgridcomp.f90->sourcefile~scratchpad.f90 sourcefile~test_runchild.pf Test_RunChild.pf sourcefile~test_runchild.pf->sourcefile~scratchpad.f90 sourcefile~test_simpleleafgridcomp.pf Test_SimpleLeafGridComp.pf sourcefile~test_simpleleafgridcomp.pf->sourcefile~scratchpad.f90

Source Code

module scratchpad
   implicit none
   private

   public :: log
   public :: append_message
   public :: clear_log

   character(:), allocatable :: log

contains

   subroutine clear_log()
      if (allocated(log)) deallocate(log)
   end subroutine clear_log

   subroutine append_message(msg)
      character(len=*), intent(in) :: msg

      if (.not. allocated(log)) then
         log = msg
      else
         log = log // ' :: ' // msg
      end if

   end subroutine append_message

end module scratchpad