-
Notifications
You must be signed in to change notification settings - Fork 4
/
demo9.f90
29 lines (28 loc) · 1003 Bytes
/
demo9.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
program demo9
!> @(#) long and short names using --LONGNAME:SHORTNAME
!!
!! When all keys have a long and short name and "strict mode" is invoked
!! where "-" is required for short names and "--" for long names Boolean
!! values may be bundled together. For example:
!!
!! demo9 -XYZ
!!
use M_CLI2, only : set_args, sget, rget, lget, set_mode
implicit none
character(len=*),parameter :: all='(*(g0))'
print *,'demo9: long and short names using --LONGNAME:SHORTNAME'
!call set_mode('strict')
call set_args(' &
& --length:l 10 &
& --height:h 12.45 &
& --switchX:X F &
& --switchY:Y F &
& --switchZ:Z F &
& --title:T "my title"')
print all,'--length or -l .... ',rget('length')
print all,'--height or -h .... ',rget('height')
print all,'--switchX or -X ... ',lget('switchX')
print all,'--switchY or -Y ... ',lget('switchY')
print all,'--switchZ or -Z ... ',lget('switchZ')
print all,'--title or -T ..... ',sget('title')
end program demo9