1 ! Test optional character arguments. We still need to pass a string
2 ! length for the absent arguments
3 program optional_string_1
7 call test(2, c
=42, b
="Hello World")
9 subroutine test(i
, a
, b
, c
)
11 character(len
=4), optional
:: a
12 character(len
=*), optional
:: b
13 integer, optional
:: c
15 if (a
.ne
. "test") STOP 1
17 if (b
.ne
. "Hello World") STOP 2