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

loadtxt/savetxt: do not require space after last entry #877

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

perazz
Copy link
Contributor

@perazz perazz commented Sep 27, 2024

Attempt to address #862.

The current formats require an end-of-row space both in savetxt and loadtxt, i.e.,

format(*(i0,1x))

This PR proposes to not require a space after the last record, i.e.,

format(*(i0,:,1x))

This should hopefully improve the seldom crashing CI tests.
@fortran-lang/stdlib @chuckyvt @minhqdao

PS: these routines would benefit from some form of error control in the read and write statements.
Without changing the API, I propose checking for iostat and iomsg, so that when something goes wrong, an error can be produced to give information about what happened (what file, which line).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant