用于进行gcc测试

源代码在线查看: transfer-1.f90

软件大小: 6330 K
上传用户: yhw002
关键词: gcc 测试
下载地址: 免注册下载 普通下载 VIP

相关代码

				! Bigendian test posted by Perseus in comp.lang.fortran on 4 July 2005.				   integer(1), parameter :: zero = 0				   LOGICAL, PARAMETER :: bigend = IACHAR(TRANSFER(1,"a")) == zero				   LOGICAL :: bigendian				   call foo ()				contains				   subroutine foo ()				   integer :: chr, ans				   if (bigend) then				     ans = 1				   else				     ans = 0				   end if				   chr = IACHAR(TRANSFER(1,"a"))				   bigendian =  chr == 0_4				   if (bigendian) then				     ans = 1				   else				     ans = 0				   end if				   end subroutine foo				end							

相关资源