Skip to content

Commit 335e6bc

Browse files
Updates code style example
1 parent f624759 commit 335e6bc

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

CODE_STYLE.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
same include subdirectory as the .fh files. See below for details.
9595
## Fortran Example
9696

97-
```Fortran ./example.F90 file
97+
```Fortran ./fms_public_example_example.F90 file
9898
9999
!***********************************************************************
100100
!* GNU Lesser General Public License
@@ -120,55 +120,55 @@
120120
!! @author <developer>
121121
!! @email gfdl.climate.model.info@noaa.gov
122122
123-
module example_mod
123+
module fms_public_example_mod
124124
use platform_mod, only r4_kind, r8_kind, i4_kind, i8_kind
125125
use util_mod, only: util_func1
126126
implicit none
127127
private
128128
129-
public :: sub1
130-
public :: func1
131-
public :: ex_subroutine
129+
public :: fms_public_example_sub1
130+
public :: fms_public_example_func1
131+
public :: fms_public_example_ex_subroutine
132132
133-
interface ex_subroutine !< generic interface block. When the user
134-
module procedure ex_subroutine_r4 !! calls ex_subroutine, the compiler checks
135-
module procedure ex_subroutine_r8 !! the input arguments and invokes either
136-
end interface ex_subroutine !! ex_subroutine_r4 or ex_subroutine_r8
137-
!! ex_subroutine_r4/8 are generated by the preprocessor
138-
!! which requires example_r4.fh, example_r8.fh, and
139-
!! example.inc files
133+
interface fms_public_example_ex_subroutine !< generic interface block. When the user
134+
module procedure ex_subroutine_r4 !! calls ex_subroutine, the compiler checks
135+
module procedure ex_subroutine_r8 !! the input arguments and invokes either
136+
end interface ex_subroutine !! ex_subroutine_r4 or ex_subroutine_r8
137+
!! ex_subroutine_r4/8 are generated by the preprocessor
138+
!! which requires example_r4.fh, example_r8.fh, and
139+
!! example.inc files
140140
141141
!> @brief Doxygen description of type.
142-
type,public :: CustomType
142+
type,public :: fms_public_example_CustomType
143143
private
144144
integer(kind=i4_kind) :: a_var !< Inline doxygen description.
145145
real(kind=r8_kind),dimension(:),allocatable :: b_arr !< long description
146146
!! continued on
147147
!! multiple lines.
148-
endtype CustomType
148+
endtype fms_public_example_CustomType
149149
150150
contains
151151
152152
!> @brief Doxygen description.
153-
subroutine sub1(arg1, arg2, &
153+
subroutine fms_public_example_sub1(arg1, arg2, &
154154
& arg3)
155155
real(kind=r4_kind),intent(in) :: arg1 !< Inline doxygen description.
156156
integer(kind=i8_kind),intent(inout) :: arg2 !< Inline doxygen description.
157157
character(len=*),intent(inout) :: arg3 !< Long inline doxygen
158158
!! description.
159159
160160
arg1=2.456_r4_kind
161-
end subroutine sub1
161+
end subroutine fms_public_example_sub1
162162
163163
!> @brief Doxygen description
164164
!! @return Function return value.
165-
function func1(arg1, arg2) result(res)
165+
function fms_public_example_ func1(arg1, arg2) result(res)
166166
integer(kind=i4_kind),intent(in) :: arg1 !< Inline doxygen description
167167
integer(kind=i4_kind),intent(in) :: arg2 !< Inline doxygen description
168168
integer(kind=r8_kind) :: res
169169
170170
res=real(arg1,r8_kind) * 3.14_r8_kind
171-
end function func1
171+
end function fms_public_example_func1
172172
173173
#include "example_r4.fh" !< These two header file contains the macro definition
174174
#include "example_r8.fh" !! and an "#include example.inc" where the procedure

0 commit comments

Comments
 (0)