[J3] (SC22WG5.6327) Questions on F_C_STRING
Bader, Reinhold
Reinhold.Bader at lrz.de
Sat Jan 23 16:30:13 UTC 2021
Hi Steve,
thanks for this feedback. I came across this because I'm preparing a paper that adds examples to the module procedures where such are missing.
I'll also add the missing sentence for the case C_CHAR=-1 to that paper, if that's OK for you.
Does the forum support attaching paper drafts or should I upload a draft to the J3 meeting area and link to there?
Regards
Reinhold
Von: J3 <j3-bounces at mailman.j3-fortran.org> Im Auftrag von Steve Lionel via J3
Gesendet: Samstag, 23. Januar 2021 16:36
An: j3 at mailman.j3-fortran.org
Cc: Steve Lionel <steve at stevelionel.com>
Betreff: Re: [J3] (SC22WG5.6327) Questions on F_C_STRING
Hi Reinhold,
We discussed both these questions at an earlier J3 meeting. It's unfortunate that we have not been able to capture these discussions. - something I hoped that the use of the J3 Forum would help with. At least for the virtual meetings we have recordings, yet they are so large they are difficult to deal with.
You are correct that F_C_STRING is not strictly necessary, but it is a useful partner of C_F_STRPOINTER and serves to help users understand how to pass strings to C.
Second, if C_CHAR has the value -1, there is no specific procedure for the generic name.
Steve
On 1/23/2021 7:14 AM, Bader, Reinhold via J3 wrote:
Dear all,
F_C_STRING is a new ISO_C_BINDING module procedure in F2x that, after some inspection, seems to be of doubtful value, and
the current specification also has an issue.
First, does it really simply do what can also be (more clearly, to my mind) written as
X // C_NULL_CHAR
or
TRIM(X) // C_NULL_CHAR
or am I missing something here?
Second, it is unclear what happens if C_CHAR has the value -1. One could conceivably fall back to default character here, or some
words (similar as for C_F_STRPOINTER) need to be added to delete the function in that case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210123/db3da925/attachment-0001.htm>
More information about the J3
mailing list