c Copyright (C) 2008-2014 Vincent Eymet c c KDISTRIBUTION is free software; you can redistribute it and/or modify c it under the terms of the GNU General Public License as published by c the Free Software Foundation; either version 3, or (at your option) c any later version. c KDISTRIBUTION is distributed in the hope that it will be useful, c but WITHOUT ANY WARRANTY; without even the implied warranty of c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the c GNU General Public License for more details. c You should have received a copy of the GNU General Public License c along with KDISTRIBUTION; if not, see c subroutine add_slash_if_absent(st) implicit none include 'max.inc' c c Purpose: to add a slash "/" to the provided character string, c in the case the last character of the string is not already a slash c c I/O: c + st: character string (maximum of 100 characters) c integer strlen character*(Nchar_mx) st character*1 last c label character*(Nchar_mx) label label='add_slash_if_absent' last=st(strlen(st):strlen(st)) c write(*,*) 'last character: ',last if (last.ne.'/') then st=st(1:strlen(st))//'/' endif return end