enum_10.f90
来自「linux下编程用 编译软件」· F90 代码 · 共 62 行
F90
62 行
! { dg-do run }! { dg-additional-sources enum_10.c }! { dg-options "-fshort-enums" }! Make sure short enums are indeed interoperable with the! corresponding C type.module enum_10enum, bind( c ) ! { dg-warning "New in Fortran 2003" } enumerator :: one1 = 1, two1, max1 = huge(1_1)end enumenum, bind( c ) ! { dg-warning "New in Fortran 2003" } enumerator :: one2 = 1, two2, max2 = huge(1_2)end enumenum, bind( c ) ! { dg-warning "New in Fortran 2003" } enumerator :: one4 = 1, two4, max4 = huge(1_4)end enumend module enum_10use enum_10interface f1 subroutine f1(i,j) use enum_10 integer (kind(max1)) :: i integer :: j end subroutine f1end interfaceinterface f2 subroutine f2(i,j) use enum_10 integer (kind(max2)) :: i integer :: j end subroutine f2end interfaceinterface f4 subroutine f4(i,j) use enum_10 integer (kind(max4)) :: i integer :: j end subroutine f4end interfacecall f1 (one1, 1)call f1 (two1, 2)call f1 (max1, huge(1_1)+0) ! Adding 0 to get default integercall f2 (one2, 1)call f2 (two2, 2)call f2 (max2, huge(1_2)+0)call f4 (one4, 1)call f4 (two4, 2)call f4 (max4, huge(1_4)+0)end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?