Determine if the system is little or big endian
function Sys_is_Little_Endian() result(endian) ! --------------------------------------------------------------------------- logical :: endian ! --------------------------------------------------------------------------- integer :: defInt character :: dummy(4) ! --------------------------------------------------------------------------- defInt = ichar('a') dummy = transfer(defInt, dummy(1), 4) endian = (dummy(1) == 'a') end function sys_is_little_endian