Working commit for dislocation generation branch
This commit is contained in:
parent
41024b9674
commit
d0e6253d64
9 changed files with 114 additions and 17 deletions
19
src/main.f90
19
src/main.f90
|
@ -17,7 +17,7 @@ program main
|
|||
use io
|
||||
|
||||
|
||||
integer :: i, end_mode_arg, arg_num
|
||||
integer :: i, end_mode_arg, arg_num, arg_pos
|
||||
character(len=100) :: argument
|
||||
|
||||
!Call initialization functions
|
||||
|
@ -37,12 +37,25 @@ program main
|
|||
end if
|
||||
|
||||
!Now we loop through all of the arguments and check for passed options or for a filename to be written out
|
||||
do i = end_mode_arg-1, arg_num
|
||||
call get_command_argument(i, argument)
|
||||
arg_pos = end_mode_arg
|
||||
do while(.true.)
|
||||
!Exit the loop if we are done reading
|
||||
if(arg_pos > arg_num) exit
|
||||
|
||||
call get_command_argument(arg_pos, argument)
|
||||
|
||||
!Check to see if a filename was passed
|
||||
if(scan(argument,'.',.true.) > 0) then
|
||||
call get_out_file(argument)
|
||||
arg_pos = arg_pos + 1
|
||||
|
||||
!Check to see if an option has been passed
|
||||
else if(argument(1:1) == '-') then
|
||||
call call_option(argument, arg_pos)
|
||||
!Otherwise print that the argument is not accepted and move on
|
||||
else
|
||||
print *, trim(adjustl(argument)), " is not accepted. Skipping to next argument"
|
||||
arg_pos = arg_pos + 1
|
||||
end if
|
||||
end do
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue