Difference between revisions of "GENIE Using NaturalDocs"

From SourceWiki
Jump to navigation Jump to search
Line 19: Line 19:
 
   integer :: koverall  
 
   integer :: koverall  
  
   !  Subroutine: Multiply
+
   contains:
  !
 
  !  Multiplies two integers.
 
  !
 
  !  Input:
 
  !
 
  !    x - The first integer.
 
  !    y - The second integer.
 
  ! 
 
  ! Input/Output: 
 
  !
 
  ! Output:
 
  !
 
  !    z - The integer which results from the multiplication.
 
  
  subroutine Multiply (x, y, z)
+
    !  Subroutine: Multiply
 +
    !
 +
    !  Multiplies two integers.
 +
    !
 +
    !  Input:
 +
    !
 +
    !    x - The first integer.
 +
    !    y - The second integer.
 +
    ! 
 +
    ! Input/Output: 
 +
    !
 +
    ! Output:
 +
    !
 +
    !    z - The integer which results from the multiplication.
  
     integer, intent(in)  :: x
+
     subroutine Multiply (x, y, z)
    integer, intent(in)  :: y
+
 
    integer, intent(out) :: z
+
      integer, intent(in)  :: x
 +
      integer, intent(in)  :: y
 +
      integer, intent(out) :: z
 
   
 
   
    z = x * y
+
      z = x * y
  
  end subroutine
+
    end subroutine
 
end MODULE
 
end MODULE
 
</pre>
 
</pre>

Revision as of 16:09, 4 April 2007

Intro

Quickstart

Here is a quick and simple example showing how you immediately get going using NaturalDocs:

MODULE mymodule

  ! File: mymodule.f90
  !
  ! Description:
  !
  ! A module containing some pretty useful stuff for use with widgets.

  ! var: koverall
  ! An important variable that I would like to document.

  integer :: koverall 

  contains:

    !  Subroutine: Multiply
    !
    !  Multiplies two integers.
    !
    !  Input:
    !
    !    x - The first integer.
    !    y - The second integer.
    !  
    ! Input/Output:   
    !
    ! Output:
    !
    !    z - The integer which results from the multiplication. 

    subroutine Multiply (x, y, z)

      integer, intent(in)  :: x
      integer, intent(in)  :: y
      integer, intent(out) :: z
 
      z = x * y

    end subroutine
end MODULE