215
216
217
218
219
220
221
222
223
225 use dc_string, only: split
226 character(len = *), intent(in):: fullname
227 character(len = *), intent(in):: dimvar
228 character(len = STRING):: result
229 character(STRING):: file, var, attr, iorange
230 character(STRING), pointer :: ioranges_slice(:) => null()
231 integer :: i, eqpos, atmark
232 continue
233 result = ""
234
235 atmark = index(fullname, gt_question)
236 if (atmark == 0) atmark = index(fullname, gt_atmark)
237 if (atmark /= 0) then
238 call urlsplit(fullname, file=file, var=var, attr=attr, iorange=iorange)
239 else
240 iorange = fullname
241 end if
242 call split(iorange, ioranges_slice, gt_comma)
243 do i = 1, size(ioranges_slice)
244 eqpos = index(ioranges_slice(i), gt_equal)
245 if (ioranges_slice(i)(1:eqpos-1) == trim(dimvar)) then
246 result = trim(ioranges_slice(i)(eqpos+1:))
247 exit
248 end if
249 end do
250 deallocate(ioranges_slice)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ