anchor.diff: +! Copyright (c) 2015 Alex Kramer <kramer.alex.kramer@gmail.com>
  +! See the LICENSE.txt file in the top-level directory of this distribution
  +!
  +! This module implements basic string conversions.
   module string
   
     use globvars, only: dp, dp_format, int_format
  
positive.code: 
    private
  
    public str_num
    interface str_num
       ! Get string representation of numbers
       module procedure str_dp_real
       module procedure str_int
    end interface str_num
  
  contains
  
    function str_dp_real(num, fmt) result(val)
      ! Get string representation of double precision real
      character(:), allocatable :: val
  
      real(dp), intent(in) :: num
  
negative.code: 
      val = trim(adjustl(tmp))
  
    end function string_dp_real
  
    function string_int(num, fmt) result(val)
      ! Get string representation of integer
      !
      ! num :: integer value to convert
      ! fmt :: optional custom format string
      character(:), allocatable :: val
  
      integer, intent(in) :: num
  