Next: 5.2.4 Further recommendations
Up: 5.2 Indentation and spaces
Previous: 5.2.2 Alignment of assignments
Contents
Index
Usual if..then..else constructs and do loops should be indented with 2 blanks per level
as for instance in
do i3=m3,n3
do i2=m2,n2
do i1=m1,n1
rho(i1,i2,i3)=model%rho(i1,i2,i3)
end do
! i1
end do
! i2
end do
! i3
or
if (Copyrho_flag) then
! -- Copy original rho array into array with buffer zones --
rho(m1:n1,i2,i3)=model%rho(m1:n1,i2,i3)
!
! -- Copy original quc array into array with buffer zones --
do iquc=1,nquc
quc(m1:n1,i2,i3,iquc)=model%quc(m1:n1,i2,i3,iquc)
end do
! iquc
endif
! (Copyrho_flag)
or
if (time_flag > 0) then
boxout%itime =box%itime
boxout%time =box%time
boxout%time_db=box%time_db
endif
(time_flag > 0)
or
! -- Set default value --
if (present(grid_flag)) then
grid_flag0=grid_flag
else
grid_flag0=1
endif
Next: 5.2.4 Further recommendations
Up: 5.2 Indentation and spaces
Previous: 5.2.2 Alignment of assignments
Contents
Index