-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathfortran90.json
107 lines (107 loc) · 2.74 KB
/
fortran90.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"Program Skeleton": {
"prefix": "program",
"body": ["program ${1:name}", "\timplicit none", "\t${0}", "end program ${1:name}"],
"description": "Program Skeleton"
},
"Module Skeleton": {
"prefix": "module",
"body": [
"module ${1:name}",
"\timplicit none",
"\t${2}",
"contains",
"\t${0}",
"end module ${1:name}"
],
"description": "Create a new module"
},
"Do Loop": {
"prefix": "do",
"body": ["do ${1:index} = ${2:start}, ${3:end}", "\t${0}", "end do"],
"description": "Create a do loop"
},
"Function": {
"prefix": "fun",
"body": [
"function ${1:func}(${2:arg}) result(${3:retval})",
"\t${4:integer}, intent(in) :: ${2:arg}",
"\t${5:integer} :: ${3:retval}",
"",
"\t${0}",
"end function ${1:func}"
],
"description": "Create a function"
},
"Subroutine": {
"prefix": "sub",
"body": [
"subroutine ${1:routine}(${2:arg1}, ${3: arg2})",
"\t${4:type1}, intent(${5:in}) :: ${2:arg1}",
"\t${6:type2}, intent(${7:out}) :: ${3:arg2}",
"",
"\t${0}",
"end subroutine ${1:routine}"
],
"description": "Create a subroutine"
},
"Type": {
"prefix": "typ",
"body": [
"type, public :: ${1:type_name}",
"\t${2:integer} :: ${3:var}",
"\t${4}",
"",
"private",
"\t${5}",
"",
"contains",
"\t${0}",
"",
"end type ${1:type_name}"
],
"description": "Create a new type"
},
"ifs": {
"prefix": "if",
"body": ["if ( ${1:condition} ) ${0}"],
"description": "if (single line)"
},
"if": {
"prefix": "if",
"body": ["if ( ${1:condition} ) then", "\t${0}", "end if"],
"description": "if then"
},
"elif": {
"prefix": "el",
"body": ["else if ( ${1:condition} ) then", "\t${0}"],
"description": "else if"
},
"imp": {
"prefix": "imp",
"body": ["implicit none", "${0}"],
"description": "implicit none"
},
"Module documentation header": {
"prefix": "modoc",
"body": [
"!------------------------------------------------------------------------------",
"! ${1:Institution}, ${2:Affiliation}",
"!------------------------------------------------------------------------------",
"!",
"! MODULE: ${3: Module name}",
"!",
"!> @author",
"!> ${4:Author Name}}",
"!",
"! DESCRIPTION: ",
"!> ${5: Short module description}",
"!",
"! REVISION HISTORY:",
"! dd Mmm yyyy - Initial Version",
"! TODO_dd_mmm_yyyy - TODO_describe_appropriate_changes - TODO_name",
"!------------------------------------------------------------------------------"
],
"description": "Add module documentation header"
}
}