@@ -140,11 +140,14 @@ Program
140140 </program >
141141
142142
143- In the body, collection of declarations followed by any number of statements can be found.
143+ In the body, :ref: ` declarations ` followed by any number of statements can be found.
144144
145- And each of the statements listed after the declarations, can be either compound or simple.
145+ And each of the statements listed after the declarations,
146+ can be one of :ref: `statements-simple ` or :ref: `statements-compound `.
146147
147148
149+ .. _declarations :
150+
148151Declarations
149152------------
150153
@@ -170,6 +173,22 @@ what kind of declaration it is.
170173Implicit declaration
171174~~~~~~~~~~~~~~~~~~~~
172175
176+ .. code :: fortran
177+
178+ implicit none
179+ implicit real (A-H,O-Z)
180+
181+ .. code :: xml
182+
183+ <declaration subtype =" none" type =" implicit" />
184+ <declaration subtype =" some" type =" implicit" >
185+ <type name =" real" type =" intrinsic" />
186+ <letter-ranges >
187+ <letter-range begin =" A" end =" H" />
188+ <letter-range begin =" O" end =" Z" />
189+ </letter-ranges >
190+ </declaration >
191+
173192
174193 Variable declaration
175194~~~~~~~~~~~~~~~~~~~~
@@ -194,16 +213,33 @@ Use
194213
195214.. code :: fortran
196215
197- use foo
198- use, fooo :: only bar
199- use, implicit :: foo only bar
200-
216+ use mpi
217+ use my_interface, only: subroutine1, subroutine2
218+ use, non_intrinsic :: my_module
219+ use, intrinsic :: iso_c_binding, only: c_int, c_float
201220
202221 .. code :: xml
203222
204- <use name =" empty" >
223+ <use name =" mpi" />
224+ <use name =" my_interface" >
225+ <only >
226+ <name id =" subroutine1" />
227+ <name id =" subroutine2" />
228+ </only >
229+ </use >
230+ <use name =" my_module" >
231+ <nature name =" non_intrinsic" />
205232 </use >
233+ <use name =" iso_c_binding" >
234+ <nature name =" intrinsic" />
235+ <only >
236+ <name id =" c_int" />
237+ <name id =" c_float" />
238+ </only >
239+ </use >
240+
206241
242+ .. _statements-compound :
207243
208244Compound statements
209245-------------------
@@ -248,6 +284,8 @@ These are also compound (i.e. each of them has :xml:`<header>` and :xml:`<body>`
248284however they exist only within the body of select statement.
249285
250286
287+ .. _statements-simple :
288+
251289Simple statements
252290-----------------
253291
@@ -318,7 +356,6 @@ Module
318356 .. code :: xml
319357
320358 <module name =" abc" >
321- <header />
322359 <body >
323360 <specification declarations =" 1" implicits =" 0" imports =" 0" uses =" 0" >
324361 <declaration type =" variable" >
0 commit comments