M_CLI2

functioninset

character(len=:) function inset(string) result(longer)

Arguments

NameTypeIntentAttributesDescription
stringcharacter(len=*)in

Result

NameTypeAttributesDescription
longercharacter(len=:)allocatable

Source

Show the code
function inset(string) result(longer)
character(len=*),intent(in)  :: string
character(len=:),allocatable :: longer
character(len=*),parameter   :: nl=new_line('a')
integer                      :: i
   longer=''
   do i=1,len(string)
      longer=longer//string(i:i)
      if(string(i:i).eq.nl)then
         longer=longer//'   '
      endif
   enddo
end function inset

Graphs

Called by

Variables

NameTypeAttributesDefaultDescription
iinteger
nlcharacter(len=*)parameternew_line('a')