From 1fd722e4cf846dbea5965e2fc55a358917fc4b16 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Wed, 25 Apr 2007 14:38:22 +0000 Subject: [PATCH] changed format for reading float from('F') to * in IO_floatValue --- trunk/IO.f90 | 130 +++++++++++++++++++++++++-------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/trunk/IO.f90 b/trunk/IO.f90 index 37c6b8996..72d696f34 100644 --- a/trunk/IO.f90 +++ b/trunk/IO.f90 @@ -257,10 +257,10 @@ character(len=*), parameter :: sep=achar(32)//achar(9)//achar(10)//achar(13) ! whitespaces integer(pInt) N, part integer(pInt) IO_stringPos(1+N*2) - + IO_stringPos = -1 IO_stringPos(1) = 0 - part = 1 + part = 1 do while ((N<1 .or. part<=N) .and. verify(line(IO_stringPos(part*2-1)+1:),sep)>0) IO_stringPos(part*2) = IO_stringPos(part*2-1)+verify(line(IO_stringPos(part*2-1)+1:),sep) IO_stringPos(part*2+1) = IO_stringPos(part*2)+scan(line(IO_stringPos(part*2):),sep)-2 @@ -283,11 +283,11 @@ character(len=*) line integer(pInt) positions(*),pos character(len=1+positions(pos*2+1)-positions(pos*2)) IO_stringValue - - if (positions(1) < pos) then - IO_stringValue = '' + + if (positions(1) < pos) then + IO_stringValue = '' else - IO_stringValue = line(positions(pos*2):positions(pos*2+1)) + IO_stringValue = line(positions(pos*2):positions(pos*2+1)) endif return @@ -324,9 +324,9 @@ real(pReal) IO_floatValue integer(pInt) positions(*),pos - if (positions(1) >= pos) then - read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT='(F)') IO_floatValue - return + if (positions(1) >= pos) then + read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT=*) IO_floatValue + return endif 100 IO_floatValue = -1.0_pReal return @@ -394,10 +394,10 @@ integer(pInt) IO_intValue integer(pInt) positions(*),pos - if (positions(1) >= pos) then - read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT='(I)') IO_intValue - return - endif + if (positions(1) >= pos) then + read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT='(I)') IO_intValue + return + endif 100 IO_intValue = -1_pInt return @@ -424,10 +424,10 @@ END FUNCTION -!******************************************************************** -! change character in line to lower case -!******************************************************************** - FUNCTION IO_lc (line) +!******************************************************************** +! change character in line to lower case +!******************************************************************** + FUNCTION IO_lc (line) use prec, only: pInt implicit none @@ -437,9 +437,9 @@ integer(pInt) i IO_lc = line - do i=1,len(line) - if(64