-
Notifications
You must be signed in to change notification settings - Fork 182
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
Enhance string_type
constructor
#563
Comments
I like the idea. I see that |
string_type
constructorstring_type
constructor
Do we have an implementation for creating strings from real and complex numbers without using internal IO in Fortran? |
I have just implemented a Fortran version of Ryu which can effectively convert floating point numbers to decimal strings. After the codes being fully tested, I think they can be adopted by stdlib. Currently it just generates the shortest representation of a floating number and doesn't support formatting. The original C implementation has Ryu printf which supports precision parameter. And I am trying to translate the C codes into Fortran. |
@St-Maxwell: is this related to the stdlib |
@jvdp1 I plan to implement conversion routines for |
@zoziha is this issue still open and also can you please give an idea of how can i resolve this issue? |
Motivation
As I said in #562 , we can enhance the constructor of
string_type
to support conversion of other types (integer
,real
,logical
,complex
) tostring_type
, and supportformat
argument.The important thing is that this constructor can be
elemental
,type(string_type)
is very good at constructing flexible string arrays, butto_string
can only bepure
becausecharacter(:), allcoatable
.At this stage,
string_type
only constructs strings fromcharacter
,integer
, andlogical
types.Prior Art
string_type
(elemental
)to_string
(pure
)Additional Information
No response
The text was updated successfully, but these errors were encountered: