From 1db2b24499ca2447392b0657b148870cbc60b818 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Mon, 27 Jan 2020 21:10:31 -0500 Subject: [PATCH] Fixes to parse_pos subroutine --- src/subroutines.f90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/subroutines.f90 b/src/subroutines.f90 index ae15a65..9fd159c 100644 --- a/src/subroutines.f90 +++ b/src/subroutines.f90 @@ -194,11 +194,12 @@ module subroutines pos = box_bd(2*i) - pos else if ((index(pos_string,'+') > 0).and.(index(pos_string,'inf')>0)) then !Now extract the number we are reducing from infinity - if(index(pos_string,'inf') < index(pos_string,'-')) then + if(index(pos_string,'inf') < index(pos_string,'+')) then read(pos_string(index(pos_string,'+')+1:), *, iostat=iospara) pos else read(pos_string(1:index(pos_string,'+')-1), *, iostat=iospara) pos end if + pos = box_bd(2*i-1) + pos else if ((index(pos_string,'*') > 0).and.(index(pos_string,'inf')>0)) then !Now extract the number we are reducing from infinity if(index(pos_string,'inf') < index(pos_string,'*')) then @@ -206,7 +207,7 @@ module subroutines else read(pos_string(1:index(pos_string,'*')-1), *, iostat=iospara) pos end if - pos = (box_bd(2*i)-box_bd(2*i-1))*pos + pos = (box_bd(2*i)-box_bd(2*i-1))*pos + box_bd(2*i-1) else read(pos_string, *, iostat=iospara) pos end if