now safe to request values from config-parsing which are not present.

3rd and up value of key "xyz" would return "0" or "0.0" in this example:
xyz   1.234   4.321
This commit is contained in:
Philip Eisenlohr 2009-06-19 07:09:39 +00:00
parent b5b4b32961
commit 660dce0f09
1 changed files with 8 additions and 4 deletions

View File

@ -497,10 +497,12 @@ endfunction
integer(pInt), intent(in) :: positions(*),pos
real(pReal) IO_floatValue
if (positions(1) >= pos) then
if (positions(1) < pos) then
IO_floatValue = 0.0_pReal
else
read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT=*) IO_floatValue
return
endif
return
100 IO_floatValue = huge(1.0_pReal)
return
@ -568,10 +570,12 @@ endfunction
integer(pInt), intent(in) :: positions(*),pos
integer(pInt) IO_intValue
if (positions(1) >= pos) then
if (positions(1) < pos) then
IO_intValue = 0_pInt
else
read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT=*) IO_intValue
return
endif
return
100 IO_intValue = huge(1_pInt)
return