mat_str2buf Subroutine

public subroutine mat_str2buf(string, buf, lrecl)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
integer, intent(out) :: buf(:)
integer, intent(in) :: lrecl

Contents

Source Code


Variables

Type Visibility Attributes Name Initial
integer, public :: i

Source Code

subroutine mat_str2buf(string,buf,lrecl)

! ident_6="@(#) M_matrix mat_str2buf(3fp) convert string to hollerith"

! g95 compiler does not support Hollerith, this is a KLUDGE to give time to think about it

character(len=*),intent(in) :: string
integer,intent(in)          :: lrecl
integer,intent(out)         :: buf(:)
integer                     :: i

   buf=iachar(' ')
   do i=1,min(lrecl,len_trim(string),size(buf))
      buf(i)=iachar(string(i:i))
   enddo

end subroutine mat_str2buf