changed _Xvalue() return codes on error to huge()
This commit is contained in:
parent
11cc6d1ee1
commit
09aad5ccb4
14
trunk/IO.f90
14
trunk/IO.f90
|
@ -328,7 +328,7 @@
|
||||||
read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT=*) IO_floatValue
|
read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT=*) IO_floatValue
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
100 IO_floatValue = -1.0_pReal
|
100 IO_floatValue = huge(1.0_pReal)
|
||||||
return
|
return
|
||||||
|
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
@ -346,9 +346,9 @@
|
||||||
real(pReal) IO_fixedFloatValue
|
real(pReal) IO_fixedFloatValue
|
||||||
integer(pInt) ends(*),pos
|
integer(pInt) ends(*),pos
|
||||||
|
|
||||||
read(UNIT=line(ends(pos-1)+1:ends(pos)),ERR=100,FMT='(F)') IO_fixedFloatValue
|
read(UNIT=line(ends(pos-1)+1:ends(pos)),ERR=100,FMT=*) IO_fixedFloatValue
|
||||||
return
|
return
|
||||||
100 IO_fixedFloatValue = -1.0_pReal
|
100 IO_fixedFloatValue = huge(1.0_pReal)
|
||||||
return
|
return
|
||||||
|
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
@ -371,12 +371,12 @@
|
||||||
read(UNIT=line(ends(pos)+1:ends(pos)+pos_exp-1),ERR=100,FMT='(F)') base
|
read(UNIT=line(ends(pos)+1:ends(pos)+pos_exp-1),ERR=100,FMT='(F)') base
|
||||||
read(UNIT=line(ends(pos)+pos_exp:ends(pos+1)),ERR=100,FMT='(I)') expon
|
read(UNIT=line(ends(pos)+pos_exp:ends(pos+1)),ERR=100,FMT='(I)') expon
|
||||||
else
|
else
|
||||||
read(UNIT=line(ends(pos)+1:ends(pos+1)),ERR=100,FMT='(F)') base
|
read(UNIT=line(ends(pos)+1:ends(pos+1)),ERR=100,FMT=*) base
|
||||||
expon = 0_pInt
|
expon = 0_pInt
|
||||||
endif
|
endif
|
||||||
IO_fixedNoEFloatValue = base*10.0_pReal**expon
|
IO_fixedNoEFloatValue = base*10.0_pReal**expon
|
||||||
return
|
return
|
||||||
100 IO_fixedNoEFloatValue = -1.0_pReal
|
100 IO_fixedNoEFloatValue = huge(1.0_pReal)
|
||||||
return
|
return
|
||||||
|
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
@ -398,7 +398,7 @@
|
||||||
read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT='(I)') IO_intValue
|
read(UNIT=line(positions(pos*2):positions(pos*2+1)),ERR=100,FMT='(I)') IO_intValue
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
100 IO_intValue = -1_pInt
|
100 IO_intValue = huge(1_pInt)
|
||||||
return
|
return
|
||||||
|
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
@ -418,7 +418,7 @@
|
||||||
|
|
||||||
read(UNIT=line(ends(pos)+1:ends(pos+1)),ERR=100,FMT='(I)') IO_fixedIntValue
|
read(UNIT=line(ends(pos)+1:ends(pos+1)),ERR=100,FMT='(I)') IO_fixedIntValue
|
||||||
return
|
return
|
||||||
100 IO_fixedIntValue = -1_pInt
|
100 IO_fixedIntValue = huge(1_pInt)
|
||||||
return
|
return
|
||||||
|
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
Loading…
Reference in New Issue