TABLE OF CONTENTS


ABINIT/appdig [ Functions ]

[ Top ] [ Functions ]

NAME

 appdig

FUNCTION

 Using input string "string" and integer "integ", make a string
 named 'strinn' by concatenating digits of "integ" with characters
 of "string"; return final string in "strinn".
 Can also treat initial empty string, then simply returns the integer in the form of a string

INPUTS

 integ=nonnegative integer whose digits will be appended to string
 string=string to which digits will be appended

OUTPUT

 strinn=string//nn

PARENTS

      berryphase_new,d2frnl,dfpt_looppert,dfpt_nstdy,dfpt_nstpaw,dfpt_scfcv
      dfptnl_loop,dtfil_init,intagm,m_gkk,m_ifc,m_io_redirect,mkfilename
      prtocc,prttagm,prttagm_images,uderiv

CHILDREN

SOURCE

 69 subroutine appdig(integ,string,strinn)
 70 
 71 
 72 !This section has been created automatically by the script Abilint (TD).
 73 !Do not modify the following lines by hand.
 74 #undef ABI_FUNC
 75 #define ABI_FUNC 'appdig'
 76 !End of the abilint section
 77 
 78  implicit none
 79 
 80 !Arguments ------------------------------------
 81 !scalars
 82  integer,intent(in) :: integ
 83  character(len=*),intent(in) :: string
 84  character(len=*),intent(out) :: strinn
 85 
 86 !Local variables-------------------------------
 87 !scalars
 88  integer :: i,length,ndig
 89  character(len=2) :: ncha
 90  character(len=8) :: form
 91  character(len=500) :: msg
 92 
 93 ! *************************************************************************
 94 !
 95 !Check that integer is nonnegative
 96  !if (integ<0) then
 97  !  write(msg,'(a,i0,a)') &
 98  !  'Input integer =',integ,' must not be <0. Argument integ was input as negative.'
 99  !  MSG_BUG(msg)
100  !end if
101 
102 !Fill output string initially with blanks to end of dimensioned length
103  length=len(strinn)
104  do i=1,length
105    strinn(i:i)=' '
106  end do
107 
108 !Find nonwhitespace length of string
109  length=len_trim(string)
110 !Copy input character string into first part of output string
111  if(length>0)then
112    strinn(1:length)=string(1:length)
113  end if
114 
115 !Find how many digits "integ" has
116  ndig=int(log10(real(integ)+0.50))+1
117 
118 !Create a format for exact number of digits using internal write
119  write(unit=ncha,fmt='(i2)') ndig
120  form='(i'//ncha//')'
121 !Do internal write to get digits of integer into character string,
122 !placing digits into appropriate end of string.
123  write(unit=strinn(1+length:length+ndig),fmt=form) integ
124 !(Note that present version writes "1" or "2" for single digit,
125 !not "01" or "02".  Latter may be preferable.  Can be amended.)
126 !
127 
128 end subroutine appdig

ABINIT/m_abicore [ Modules ]

[ Top ] [ Modules ]

NAME

  m_abicore

FUNCTION

COPYRIGHT

 Copyright (C) 2008-2018 ABINIT group
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .

PARENTS

CHILDREN

SOURCE

20 #if defined HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23 
24 #include "abi_common.h"
25 
26 module m_abicore
27 
28  !use defs_basis
29  !use m_build_info
30  use m_profiling_abi
31  use m_specialmsg !,  only : herald, specialmsg_setcount, specialmsg_getcount, specialmsg_mpisum, wrtout
32  !use m_errors
33 
34  implicit none
35 
36  public
37 
38 contains  !=====================================================