Skip to content

Commit e73677a

Browse files
committed
Add correct syntax highlighting
1 parent e17cba7 commit e73677a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

learn/best_practices/arrays.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ call g(size(s, 1), size(s, 2), s)
122122
Note that the shape is not checked, therefore the following would be valid code
123123
with will potentially yield incorrect results:
124124

125-
```
125+
```fortran
126126
real(dp) :: s(3, 4)
127127
call g(size(s), 1, s) ! s(12, 1) in g
128128
call g(size(s, 2), size(s, 1), s) ! s(4, 3) in g

learn/best_practices/multidim_arrays.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ is evaluated, note that the points are stored contiguously in the arrays
2020
``xyz1``/``xyz2``, while the inner-most loop is advancing the left-most
2121
index of the matrix ``a``.
2222

23-
```
23+
```fortran
2424
subroutine coulomb_matrix(xyz1, xyz2, a)
2525
real(dp), intent(in) :: xyz1(:, :)
2626
real(dp), intent(in) :: xyz2(:, :)
@@ -37,7 +37,7 @@ end subroutine coulomb_matrix
3737
Another example would be the contraction of the third dimension of a rank
3838
three array:
3939

40-
```
40+
```fortran
4141
do i = 1, size(amat, 3)
4242
do j = 1, size(amat, 2)
4343
do k = 1, size(amat, 1)
@@ -54,7 +54,7 @@ and potentially create a temporary copy of the array.
5454
For example this can be used to contract the third dimension of a rank
5555
three array using a matrix-vector operation:
5656

57-
```
57+
```fortran
5858
subroutine matmul312(amat, bvec, cmat)
5959
real(dp), contiguous, intent(in) :: amat(:, :, :)
6060
real(dp), intent(in) :: bvec(:)

0 commit comments

Comments
 (0)