Read an undelimited (no leading apostrophe or double quote) character value according to the rules for list directed input.
A blank, comma/semicolon (depending on the decimal mode), slash or end of record terminates the string.
If input is terminated by end of record, then this procedure returns an end-of-record condition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(string), | intent(inout) | :: | dtv | The string. |
||
| integer, | intent(in) | :: | unit | Logical unit. |
||
| integer, | intent(out) | :: | iostat | IO status code. |
||
| character(len=*), | intent(inout) | :: | iomsg | IO status message. |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine read_undelimited_listdirected(dtv, unit, iostat, iomsg)
!---------------------------------------------------------------------------------------------------------------------------------
!< Read an undelimited (no leading apostrophe or double quote) character value according to the rules for list directed input.
!<
!< A blank, comma/semicolon (depending on the decimal mode), slash or end of record terminates the string.
!<
!< If input is terminated by end of record, then this procedure returns an end-of-record condition.
!---------------------------------------------------------------------------------------------------------------------------------
class(string), intent(inout) :: dtv !< The string.
integer, intent(in) :: unit !< Logical unit.
integer, intent(out) :: iostat !< IO status code.
character(len=*), intent(inout) :: iomsg !< IO status message.
logical :: decimal_point !<True if DECIMAL=POINT in effect.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
call get_decimal_mode(unit=unit, decimal_point=decimal_point, iostat=iostat, iomsg=iomsg)
if (iostat /= 0) return
call dtv%read_undelimited(unit=unit, terminators=' '//'/'//merge(CK_',', CK_';', decimal_point), iostat=iostat, iomsg=iomsg)
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine read_undelimited_listdirected