[J3] Value separators
Gary Klimowicz
gak at dancingbear.dev
Thu Feb 2 17:17:35 UTC 2023
On Feb 2, 2023, at 07:13, Steve Lionel via J3 <j3 at mailman.j3-fortran.org> wrote:
>
> Reading CSV files is far more complex than dealing with value separators. Fields can be dates, times, currencies and more. Yes, some programs that write CSVs offer the option to enclose strings in quotes, but many do not. Trying to shoehorn this into list-directed (or even formatted) input would be a mistake.
>
> I think that we already have an effective tool for reading CSVs in the new SPLIT intrinsic. This has you specify the delimiter(s) you want to look for and allows you to make interpretation choices on a column by column basis.
>
> As for writing CSVs, that's what we put in unlimited repeat count and G0 for. Is it perfect? No. But it is a useful tool that satisfies many needs.
As useful as this would be, it doesn't feel like something that needs the be included in the language standard.
Next requests could be list-directed support for JSON, or YAML, or XML, or S-expressions.
It feels more like something we would like a really excellent library for.
(The exercise is left for the reader. I'll be working on S-expressions.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230202/7551576c/attachment.htm>
More information about the J3
mailing list