Wrapper for fake calls.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | args |
Fake arguments. |
||
logical, | intent(out) | :: | spectrum |
Spectrum value. |
||
logical, | intent(out) | :: | domain |
Domain value. |
||
logical, | intent(out) | :: | grid |
Grid value. |
subroutine fake_call(args, spectrum, domain, grid) !--------------------------------------------------------------------------------------------------------------------------------- !< Wrapper for fake calls. !--------------------------------------------------------------------------------------------------------------------------------- character(*), intent(in) :: args !< Fake arguments. logical, intent(out) :: spectrum !< Spectrum value. logical, intent(out) :: domain !< Domain value. logical, intent(out) :: grid !< Grid value. type(command_line_interface) :: cli !< Command Line Interface (CLI). integer(I4P) :: error !< Error trapping flag. !--------------------------------------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------------------------------------- call cli%init call cli%add_group(group='new', description='create new instance') call cli%add(group='new', switch='--spectrum', switch_ab='-s', & help='Create new spectrum', required=.false., def='.false.', & act='store_true', error=error) if (error/=0) stop call cli%add(group='new', switch='--domain', switch_ab='-d', & help='Create new domain', required=.false., def='.false.', & act='store_true', error=error) if (error/=0) stop call cli%add(group='new', switch='--grid', switch_ab='-g', & help='Create new grid', required=.false., def='.false.', & act='store_true', error=error) if (error/=0) stop call cli%parse(args=args, error=error) if (error/=0) stop call cli%get(group='new', switch='--spectrum', val=spectrum, error=error) if (error/=0) stop call cli%get(group='new', switch='--domain', val=domain, error=error) if (error/=0) stop call cli%get(group='new', switch='--grid', val=grid, error=error) if (error/=0) stop !--------------------------------------------------------------------------------------------------------------------------------- endsubroutine fake_call