Dispatch one parsed CLI token onto the worker-CLI state.
get_command_argument returns arg_len as the argument's TRUE length,
which can exceed the fixed arg buffer for an over-long argument; the
length is therefore clamped to len(arg) before any substring is taken
so arg(17:arg_len) / arg(1:arg_len) can never index past the buffer
(an out-of-bounds read otherwise). An over-long value is truncated to the
buffer rather than overflowing it. Factored out of resolve_cli so the
clamp is exercised directly by the runtime-check (bounds) gate.
`len(arg)`); the routine clamps it internally to
`len(arg)` before slicing — callers pass it as-is.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | arg |
The argument buffer as filled by |
||
| integer, | intent(in) | :: | arg_len |
The argument's reported TRUE length (may exceed |
||
| character(len=*), | intent(inout) | :: | nml_file |
Updated in place with a positional namelist path. |
||
| character(len=*), | intent(inout) | :: | cortex_uri |
Updated in place with a positional namelist path.
Updated in place with a |
||
| logical, | intent(inout) | :: | attached |
Set |