Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
constant_integer.f9023 linesDownload Raw Back to parameter
1! Check that parameters are correct intercepted.
2! Constants with comma separations are commonly
3! used, for instance Pi = 3._dp
4subroutine foo_int(x)
5  implicit none
6  integer, parameter :: ii = selected_int_kind(9)
7  integer(ii), intent(inout) :: x
8  dimension x(3)
9  integer(ii), parameter :: three = 3_ii
10  x(1) = x(1) + x(2) + x(3) * three
11  return
12end subroutine
13
14subroutine foo_long(x)
15  implicit none
16  integer, parameter :: ii = selected_int_kind(18)
17  integer(ii), intent(inout) :: x
18  dimension x(3)
19  integer(ii), parameter :: three = 3_ii
20  x(1) = x(1) + x(2) + x(3) * three
21  return
22end subroutine
23 
codekingpro/portable-devtools · Team Ai