demo13.f90 – M_CLI2
Author: John S. Urban
Description: command line parsing

# demo13.f90 Source File

- 10 statements
- Source File

### Contents

### Programs

demo13

### Source Code

demo13.f90

## Source Code

    program demo13
    !> @(#) underdash mode
    !! Any dash in a key name is treated as an underscore
    !! when underdash mode is on
    !!
    !!     demo13 --switch-X
    !!     demo13 --switch_X
    !!
    !! are equivalent when this mode is on
    !!
    use M_CLI2,  only : set_args, lget, set_mode
    implicit none
    character(len=*),parameter :: all='(*(g0))'

       print *,'demo13: underdash mode'

       call set_mode('underdash')
       call set_args(' --switch_X:X F --switch-Y:Y F ')
       print all,'--switch_X or -X ... ',lget('switch_X')
       print all,'--switch_Y or -Y ... ',lget('switch_Y')
    end program demo13