Minor update pure/elemental
in string_type
module
#562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pure elemental -> elemental
: ✔string_type
procedurenew_string
new_string_from_integer
new_string_from_logical
pure -> elemental
: ❓(Update: ❌)interfacechar
procedurechar_string
char_string_range
private functionmaybe
elemental
: ❓(Update: ✔)move
proceduremove_string_string
pure
: ✔move
proceduremove_char_string
move_char_string
move_char_char
Description
Here I have updated the elemental attributes of the routine. There are two areas that are doubtful ❓, but I think they can be
elemental
.Another proposal
There is another issue.
string_type
interface relies on theto_string
routine, it can convertcharacter
,integer
, andlogical
variables into strings and be elemental becausetype(string_type)
can be non-allocatable, but it does not support theformat
argument.While
to_string
supportsinteger
,real
,complex
andlogical
types, supportformat
argument, but not elemental.string_type
seems to have a elemental advantage to construct strings. It seems that we can take advantage of this and letstring_type
add support forreal
andcomplex
types, and support theformat
argument?