<Example Program>
Module steps Integer, Private :: hidden_stepval = 0 Public :: step,step_value Contains Integer Function step_value() step_value = hidden_stepval End Function Subroutine step hidden_stepval = hidden_stepval + 10 End Subroutine End Module Program public_example Use steps Print *, step_value() Call step Print *, step_value() End Program |
|
![]() 0 10 |