Skip to content

Commit cc83260

Browse files
committed
Document default initialization of structs
1 parent 30d0294 commit cc83260

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/Manual/src/Fortran.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,8 @@ f = Foo()
14521452
call f%set_val(123)
14531453
value = f%get_val()
14541454
```
1455+
As in C++, the construction of `Foo()` default-initializes member data, so the
1456+
result of `f%get_val()` will be zero immediately after construction.
14551457

14561458
## Inheritance
14571459

0 commit comments

Comments
 (0)