Restructure the command parsing loops so the mode commands only parse the mode options

This commit is contained in:
Alex Selimov 2019-12-11 09:07:59 -05:00 committed by Alex Selimov
parent c291ec65b4
commit 0dff3b2ca9
5 changed files with 49 additions and 52 deletions

View file

@ -1,4 +1,4 @@
subroutine call_mode(arg_num,mode)
subroutine call_mode(arg_pos,mode)
!This code is used to parse the command line argument for the mode information and calls the required
!mode module.
@ -9,16 +9,16 @@ subroutine call_mode(arg_num,mode)
implicit none
integer, intent(in) :: arg_num
integer, intent(out) :: arg_pos
character(len=100), intent(in) :: mode
select case(mode)
case('--create')
call create
call create(arg_pos)
case('--convert')
call convert
call convert(arg_pos)
case('--merge')
call merge
call merge(arg_pos)
case default
print *, "Mode ", trim(adjustl(mode)), " currently not accepted. Please check documentation for ", &
"accepted modes and rerun."