Fortran

😄Fortran--数据类型:整型

2019-03-25  本文已影响0人  YI_YI_
1:2个字节
2:4个字节
3:8个字节
4: 16个字节
program testingInt
    implicit none
    !two byte integer
    integer(kind=2) :: shortval
    
    !four byte integer
    integer(kind=4) :: longval
    
    !eight byte integer
    integer(kind=8) :: verylongval
    
    !sixteen byte integer
    !integer(kind=16) :: veryverylongval
    
    !default integer
    integer :: defval
    
    print*,huge(shortval)
    print*,huge(longval)
    print*,huge(verylongval)
    !print*,huge(veryverylongval)
    print*,huge(defval)
    read*
    
    end program testingInt
上一篇 下一篇

猜你喜欢

热点阅读