optstring_1.f90
来自「Mac OS X 10.4.9 for x86 Source Code gcc」· F90 代码 · 共 22 行
F90
22 行
! Test optional character arguments. We still need to pass a string! length for the absent argumentsprogram optional_string_1 implicit none call test(1, "test"); call test(2, c=42, b="Hello World")containssubroutine test(i, a, b, c) integer :: i character(len=4), optional :: a character(len=*), optional :: b integer, optional :: c if (i .eq. 1) then if (a .ne. "test") call abort else if (b .ne. "Hello World") call abort if (c .ne. 42) call abort end ifend subroutineend program
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?