Skip to content

Commit 8ecb9dd

Browse files
committed
doc
1 parent 244fb21 commit 8ecb9dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/pointer/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ and modern "nullptr" in
66
[C23](https://en.cppreference.com/w/c/language/nullptr)
77
are represented in Fortran
88
[iso_c_binding](https://fortranwiki.org/fortran/show/iso_c_binding).
9+
910
Unlike in C / C++, do not check equality with C_NULL_PTR in Fortran.
1011
Instead, by definition the
1112
[c_associated()](https://fortranwiki.org/fortran/show/c_associated)
1213
logical function returns ".false." if the C_PTR is C_NULL_PTR, and ".true." otherwise.
14+
See [strptime.f90](./strptime.f90)
15+
for an example of checking in Fortran for a C null pointer returned from a function.

0 commit comments

Comments
 (0)