You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the nice tutorial. Here are some suggestions. If you agree with them I could create a pull request.
"Directly after the gfortran command, you find the input file name."
I would use the term "source file" instead, since an input file is typically a file with data that a program reads.
"The main program in Fortran is indicated by the program statement, which is not present in the empty file we gave to gfortran."
I understand what you are trying to convey, but this is not quite correct, since
print*,"hi"
end
is a valid program, with program not appearing anywhere.
Capitalize the "c" in
check the conditions for simple cases, start by setting up quadratic equations with known roots and compare your results against the program.
and change
"there is no reason to limit us to positive values, modify the program such that it also takes negative values and breaks at zero."
to
"There is no reason to limit ourselves to positive values. Modify the program such that it also takes negative values and breaks at zero."
For the program
program array
implicit none
intrinsic :: sum, product, maxval, minval
integer :: vec(3)
! get all elements from standard input
read(*, *) vec
! produce some results
write(*, *) "Sum of all elements", sum(vec)
write(*, *) "Product of all elemnts", product(vec)
write(*, *) "Maximal/minimal value", maxval(vec), minval(vec)
end program array
I suggest adding the line
write(*,*) "Positions of maximal/minimal values", maxloc(vec), minloc(vec)
Break "The sum and product can also work on only one of the two dimensions, try to use them only for the rows or columns of the matrix" into 2 sentences as
"The sum and product can also work on only one of the two dimensions. Try to use them only for the rows or columns of the matrix."
I suggest rewording
"Functions of this kind are called subroutines"
as
"Procedures of this kind are called subroutines."
The text was updated successfully, but these errors were encountered:
Thanks for the nice tutorial. Here are some suggestions. If you agree with them I could create a pull request.
"Directly after the gfortran command, you find the input file name."
I would use the term "source file" instead, since an input file is typically a file with data that a program reads.
"The main program in Fortran is indicated by the program statement, which is not present in the empty file we gave to gfortran."
I understand what you are trying to convey, but this is not quite correct, since
is a valid program, with
program
not appearing anywhere.Capitalize the "c" in
check the conditions for simple cases, start by setting up quadratic equations with known roots and compare your results against the program.
and change
"there is no reason to limit us to positive values, modify the program such that it also takes negative values and breaks at zero."
to
"There is no reason to limit ourselves to positive values. Modify the program such that it also takes negative values and breaks at zero."
For the program
I suggest adding the line
write(*,*) "Positions of maximal/minimal values", maxloc(vec), minloc(vec)
Break "The sum and product can also work on only one of the two dimensions, try to use them only for the rows or columns of the matrix" into 2 sentences as
"The sum and product can also work on only one of the two dimensions. Try to use them only for the rows or columns of the matrix."
I suggest rewording
"Functions of this kind are called subroutines"
as
"Procedures of this kind are called subroutines."
The text was updated successfully, but these errors were encountered: