Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string | |||
integer, | intent(out) | :: | buf(:) | |||
integer, | intent(in) | :: | lrecl |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | i |
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