subroutine penf_print(unit, pref, iostat, iomsg)
!< Print to the specified unit the PENF's environment data.
!<
!<```fortran
!< use penf
!< integer :: u
!< open(newunit=u, status='scratch')
!< call penf_print(u)
!< close(u)
!< print "(A)", 'done'
!<```
!=> done <<<
integer(I4P), intent(in) :: unit !< Logic unit.
character(*), intent(in), optional :: pref !< Prefixing string.
integer(I4P), intent(out), optional :: iostat !< IO error.
character(*), intent(out), optional :: iomsg !< IO error message.
character(len=:), allocatable :: prefd !< Prefixing string.
integer(I4P) :: iostatd !< IO error.
character(500) :: iomsgd !< Temporary variable for IO error message.
if (.not.is_initialized) call penf_init
prefd = '' ; if (present(pref)) prefd = pref
if (endian==endianL) then
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd)prefd//'This architecture has LITTLE Endian bit ordering'
else
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd)prefd//'This architecture has BIG Endian bit ordering'
endif
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Character kind:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' ASCII: '//str(n=ASCII)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' UCS4: '//str(n=UCS4)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' CK: '//str(n=CK)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Reals kind, format and characters number:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R16P: '//str(n=R16P)//','//FR16P//','//str(n=DR16P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R8P: '//str(n=R8P )//','//FR8P //','//str(n=DR8P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R4P: '//str(n=R4P )//','//FR4P //','//str(n=DR4P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R_P: '//str(n=R_P )//','//FR_P //','//str(n=DR_P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Integers kind, format and characters number:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I8P: '//str(n=I8P)//','//FI8P //','//str(n=DI8P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I4P: '//str(n=I4P)//','//FI4P //','//str(n=DI4P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I2P: '//str(n=I2P)//','//FI2P //','//str(n=DI2P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I1P: '//str(n=I1P)//','//FI1P //','//str(n=DI1P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Reals minimum and maximum values:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R16P: '//str(n=MinR16P)//','//str(n=MaxR16P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R8P: '//str(n=MinR8P )//','//str(n=MaxR8P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R4P: '//str(n=MinR4P )//','//str(n=MaxR4P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R_P: '//str(n=MinR_P )//','//str(n=MaxR_P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Integergs minimum and maximum values:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I8P: '//str(n=MinI8P )//','//str(n=MaxI8P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I4P: '//str(n=MinI4P )//','//str(n=MaxI4P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I2P: '//str(n=MinI2P )//','//str(n=MaxI2P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I1P: '//str(n=MinI1P )//','//str(n=MaxI1P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Reals bits/bytes sizes:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R16P: '//str(n=BIR16P)//'/'//str(n=BYR16P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R8P: '//str(n=BIR8P )//'/'//str(n=BYR8P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R4P: '//str(n=BIR4P )//'/'//str(n=BYR4P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' R_P: '//str(n=BIR_P )//'/'//str(n=BYR_P )
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Integers bits/bytes sizes:'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I8P: '//str(n=BII8P)//'/'//str(n=BYI8P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I4P: '//str(n=BII4P)//'/'//str(n=BYI4P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I2P: '//str(n=BII2P)//'/'//str(n=BYI2P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' I1P: '//str(n=BII1P)//'/'//str(n=BYI1P)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Smallest reals'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' smallR16P: '//str(smallR16P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' smallR8P: '//str(smallR8P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' smallR4P: '//str(smallR4P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' smallR_P: '//str(smallR_P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//'Machine zero'
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' ZeroR16P: '//str(ZeroR16P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' ZeroR8P: '//str(ZeroR8P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' ZeroR4P: '//str(ZeroR4P, .true.)
write(unit=unit,fmt='(A)',iostat=iostatd,iomsg=iomsgd) prefd//' ZeroR_P: '//str(ZeroR_P, .true.)
if (present(iostat)) iostat = iostatd
if (present(iomsg)) iomsg = iomsgd
endsubroutine penf_print