Skip to content
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

Add complex number Descriptor #212

Open
Euler-37 opened this issue Jun 25, 2021 · 3 comments
Open

Add complex number Descriptor #212

Euler-37 opened this issue Jun 25, 2021 · 3 comments
Labels
Clause 13 Standard Clause 13: Input/output editing

Comments

@Euler-37
Copy link

Euler-37 commented Jun 25, 2021

add descriptor to dispay format complex data
(1) format(CF10.4) <-format("(",F10.4,",",F10.4,")")
(2) format(CES12.5) <-format("(",ES12.5,",",ES12.5,")")
(3) Experimental , add python like format
format(ZF10.4) <- format(F10.4,"+",F10.4,"j")
format(ZES12.5) <-format(ES12.5,"+",ES12.5,"j")

@certik
Copy link
Member

certik commented Jul 1, 2021

I think both of these could be implemented in stdlib first.

@Euler-37
Copy link
Author

Euler-37 commented Jul 2, 2021

I think both of these could be implemented in stdlib first.

Yes , (feature) disp they prepare to add function disp ,It is a good feature.

@klausler
Copy link

klausler commented Aug 2, 2021

Examples (1) and (2) are surprising omissions in Fortran; implementing them would be straightforward and valuable. List-directed and NAMELIST output of COMPLEX already exist in the language in this parenthesized form, with an adjustable comma character too.

Example (3) is more dubious. The FORMAT edit descriptor "Z" is already taken for another purpose, and emitting a form of complex output that differs from those used in Fortran source code is less compelling.

@certik certik added the Clause 13 Standard Clause 13: Input/output editing label Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clause 13 Standard Clause 13: Input/output editing
Projects
None yet
Development

No branches or pull requests

3 participants