Changeset View
Changeset View
Standalone View
Standalone View
autotests/folding/highlight.f90.fold
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 87 | contains | |||
---|---|---|---|---|---|
106 | 106 | | |||
107 | 107 | | |||
108 | ! A simple recursive function | 108 | ! A simple recursive function | ||
109 | recursive <beginfold id='1'>function</beginfold id='1'> factorial(i) result (rs) | 109 | recursive <beginfold id='1'>function</beginfold id='1'> factorial(i) result (rs) | ||
110 | integer :: rs | 110 | integer :: rs | ||
111 | integer, intent(in) :: i | 111 | integer, intent(in) :: i | ||
112 | if ( i <= 1 ) <beginfold id='2'>then</beginfold id='2'> | 112 | if ( i <= 1 ) <beginfold id='2'>then</beginfold id='2'> | ||
113 | rs = 1 | 113 | rs = 1 | ||
114 | <endfold id='2'>else</endfold id='2'><beginfold id='2'>else</beginfold id='2'> | 114 | <endfold id='2'></endfold id='2'><beginfold id='2'>else</beginfold id='2'> | ||
115 | rs = i * factorial(i - 1) | 115 | rs = i * factorial(i - 1) | ||
116 | <endfold id='2'>end if</endfold id='2'> | 116 | <endfold id='2'>end if</endfold id='2'> | ||
117 | <endfold id='1'>end function</endfold id='1'> factorial | 117 | <endfold id='1'>end function</endfold id='1'> factorial | ||
118 | 118 | | |||
119 | 119 | | |||
120 | ! This is a useless function | 120 | ! This is a useless function | ||
121 | <beginfold id='1'>subroutine</beginfold id='1'> example_fn(int_arg, real_arg, str_arg) | 121 | <beginfold id='1'>subroutine</beginfold id='1'> example_fn(int_arg, real_arg, str_arg) | ||
122 | integer, intent(in) :: int_arg | 122 | integer, intent(in) :: int_arg | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |