blob: 2d93b21e47c55886f31b4cb05dd3386ac2c413b8 [file] [log] [blame]
module mod
implicit none
integer :: variable !3,14,8
private :: variable
contains
subroutine setVariable(value)
implicit none
integer, intent(in) :: value
variable = value
end subroutine
integer function getVariable()
implicit none
getVariable = variable
end function
end module
program encap1
use mod
implicit none
call setVariable(3)
! 9 + 1
call setVariable(getVariable() *getVariable() + (getVariable() - 2))
print *,getVariable(), " should be equal to ", 10
end program encap1