Renders a token vocabulary as "a, b, c", for an error message.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | tokens(:) |
the accepted vocabulary. |
||
| character(len=:), | intent(out), | allocatable | :: | out |
comma-separated, in array order. |
subroutine token_list(tokens, out) character(len=*), intent(in) :: tokens(:) !! the accepted vocabulary. character(len=:), allocatable, intent(out) :: out !! comma-separated, in array order. integer :: i out = "" do i = 1, size(tokens) if (i > 1) out = out // ", " out = out // trim(tokens(i)) end do end subroutine token_list