Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Call-an-object-method/Fortran/call-an-object-method.f
Normal file
14
Task/Call-an-object-method/Fortran/call-an-object-method.f
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
! type declaration
|
||||
type my_type
|
||||
contains
|
||||
procedure, pass :: method1
|
||||
procedure, pass, pointer :: method2
|
||||
end type my_type
|
||||
|
||||
! declare object of type my_type
|
||||
type(my_type) :: mytype_object
|
||||
|
||||
!static call
|
||||
call mytype_object%method1() ! call method1 defined as subroutine
|
||||
!instance?
|
||||
mytype_object%method2() ! call method2 defined as function
|
||||
Loading…
Add table
Add a link
Reference in a new issue