title: When do I have to use CONTAINS in a module?
body: <p>I have the following module defined:</p>
  <pre><code>module data_model_2
  
          implicit none
  
          ! -------------------
          ! TYPE DEFINITION
          ! -------------------
          type :: type1_record
                  integer                 :: month
                  integer                 :: day
                  integer                 :: year
                  integer                 :: hour
                  integer                 :: minute
                  integer                 :: second
                  integer                 :: value1
                  integer                 :: value2
          end type
          type :: timestamp_record
                  integer                 :: year
                  integer                 :: month
                  integer                 :: day
                  integer                 :: hour
                  integer                 :: minute
                  integer                 :: second
          end type
  
  end module
  </code></pre>
  <p>I have seen that <code>modules</code> shall use the clause <code>contains</code>. Is the clause needed when the module contains only derived types definition?</p>
  <p>If so, where shall it be included, after or before the <code>implicit none</code>?</p>
  <p>If the module would include also functions or procedures, shall the derived types definitions be before or after <code>contains</code> clause?</p>
  <p>I am interested in knowing how this works in Fortran 95 and Fortran 03.</p>