The new edition of Modern Fortran Explained: Incorporating Fortran 2023 was published on 7 December and is available on the OUP website ( Modern Fortran Explained - Paperback - Michael Metcalf, John Reid, Malcolm Cohen, Reinhold Bader - Oxford University Press (oup.com)) and some Amazon websites. The text has been completely revised and reordered. It contains two completely new chapters on the F2023 features. Further, the extended examples will be downloadable. This applies not only to the extisting OOP example, but also to three complete, new examples of coarray code. We are joined by Reinhold Bader as a fourth author.
I’m really glad that it’s out. I have the Fortran 2008 edition and I’ve put off buying the 2018 version in the hopes that 2023 would come out soon.
Great! I’ve been a happy customer since learning Fortran as an undergrad via “Effective Fortran 77”. Just ordered a copy to ship over from the UK…
Yes, and in particular it should be possible to order direct from OUP with world-wide shipping: OUP site . China is listed in the list of countries to which deliveries can be made: China is in this list
I got the book and read a couple of chapters. I am very satisfied with it.
One question:
In Figure 2.4, there is an allocatable vector of the type one:
type(one), allocatable :: alloc(:)
Where
type one
integer :: comp
end type one
The authors talk about alloc % comp. But if alloc is a vector, can we refer to the comp like that? Even in the text? Should it be something like alloc(:) % comp?
The book is correct. For example, the following code compiles and runs with gfortran, ifort, and g95
implicit none
integer, parameter :: n = 3
type one
integer :: comp
end type one
type(one), allocatable :: alloc(:)
integer :: i
allocate (alloc(n))
do i=1,n
alloc(i)%comp = i**2
end do
print*,alloc%comp
end