Parse a string into tokens. This subroutine implements the tokenize intrinsic procedure as defined in
the Fortran 2023 language standard (Section 16.9.210). We implement it ourselves because the compiler support may
take years to become widespread.
(KCW, 2025-10-29)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | string | |||
| character(len=*), | intent(in) | :: | set | |||
| integer, | intent(out), | allocatable | :: | first(:) | ||
| integer, | intent(out), | allocatable | :: | last(:) |
Parse a string into tokens. This subroutine implements the tokenize intrinsic procedure as defined in
the Fortran 2023 language standard (Section 16.9.210). We implement it ourselves because the compiler support may
take years to become widespread.
(KCW, 2025-10-29)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | string | |||
| character(len=*), | intent(in) | :: | set | |||
| character(len=:), | intent(out), | allocatable | :: | tokens(:) | ||
| character(len=:), | intent(out), | optional, | allocatable | :: | separator(:) |