User Tools

Site Tools


prokop_hapala

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
prokop_hapala [2012/10/08 10:16]
prokop
prokop_hapala [2012/11/30 13:01] (current)
Line 4: Line 4:
 http://​www.pgroup.com/​lit/​articles/​insider/​v3n1a3.htm http://​www.pgroup.com/​lit/​articles/​insider/​v3n1a3.htm
  
-[code] +   module myModule 
- +    implicit none 
-module myModule +     
-implicit none +    ​type myType 
-type myType +     ​integer :: n  
-integer :: n  +     ​real, dimension (:, :), allocatable :: Rs  
-real, dimension (:, :), allocatable :: Rs  +    contains 
-contains +     ​procedure :: myMethod 
-procedure :: myMethod +    end type subSystem 
-end type subSystem +     
-type (myType) :: myInstance +    ​type (myType) :: myInstance 
-contains  +     
- ​subroutine myMethod ( this, myVar) +    ​contains  
-  class (subSystem) :: this +      
-  real :: myVar +     subroutine myMethod ( this, myVar) 
-  integer i +      class (subSystem) :: this 
- ​allocate (this%Rs(3,​this%n)) +      real :: myVar 
-  do i = 1, this%n +      integer i 
-   ​this%Rs(:,​i) = myVar +      allocate (this%Rs(3,​this%n)) 
-  end do +      do i = 1, this%n 
- end subroutine myMethod +       ​this%Rs(:,​i) = myVar 
-end module glob_vars +      end do 
-call myInstance%myMethod(myVar) +     ​end subroutine myMethod 
-[code] +      
 +    ​end module glob_vars 
 +     
 +    ​call myInstance%myMethod(myVar)
  
  
Line 99: Line 101:
  
 [[BrainSorm]] [[BrainSorm]]
 +
 +=== OTHER ===
 +
 +[[Wiki Playground]]
prokop_hapala.1349684208.txt.gz · Last modified: 2012/10/08 10:16 (external edit)