-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept any length symbols' strings #1172
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not work if you don't account for the variable character length in the allocation of the temporary array.
@awvwgk, why does not it work? See an example here: https://godbolt.org/z/fc7nTKxnP |
Because the allocation in the procedure still allocates using a fixed size, which would result in silent truncation. There is nothing against allocatable character arrays with allocatable length here (except spotty compiler support, as usual). |
1ce07ea
to
9ded4ae
Compare
@awvwgk, I have inserted a check that input string is no longer than |
Noticed with xtb/vertical test, where length of symbols' strings equals one Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Noticed with xtb/vertical test, where length of symbols' strings equals one