PGI fails if optional argument is not present
This commit is contained in:
parent
deedbc4fda
commit
72304638f9
|
@ -684,7 +684,11 @@ function IO_stringValue(string,chunkPos,myChunk,silent)
|
||||||
|
|
||||||
logical :: warn
|
logical :: warn
|
||||||
|
|
||||||
warn = merge(silent,.false.,present(silent))
|
if (present(silent)) then
|
||||||
|
warn = silent
|
||||||
|
else
|
||||||
|
warn = .false.
|
||||||
|
endif
|
||||||
|
|
||||||
IO_stringValue = ''
|
IO_stringValue = ''
|
||||||
valuePresent: if (myChunk > chunkPos(1) .or. myChunk < 1_pInt) then
|
valuePresent: if (myChunk > chunkPos(1) .or. myChunk < 1_pInt) then
|
||||||
|
|
|
@ -513,8 +513,12 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found, &
|
logical :: found, &
|
||||||
whole
|
whole
|
||||||
|
if (present(raw)) then
|
||||||
|
whole = raw
|
||||||
|
else
|
||||||
|
whole = .false.
|
||||||
|
endif
|
||||||
|
|
||||||
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) then
|
if (found) then
|
||||||
getString = trim(defaultVal)
|
getString = trim(defaultVal)
|
||||||
|
@ -661,7 +665,11 @@ function getStrings(this,key,defaultVal,requiredShape,raw)
|
||||||
cumulative
|
cumulative
|
||||||
|
|
||||||
cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')')
|
cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')')
|
||||||
whole = merge(raw,.false.,present(raw))
|
if (present(raw)) then
|
||||||
|
whole = raw
|
||||||
|
else
|
||||||
|
whole = .false.
|
||||||
|
endif
|
||||||
found = .false.
|
found = .false.
|
||||||
|
|
||||||
item => this
|
item => this
|
||||||
|
|
Loading…
Reference in New Issue