akaGM
Platinum Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору module test implicit none ! private contains subroutine sub_main(arg01, arg02) implicit none integer arg01 real arg02 !global scope vars integer loc11/11/ real loc12/12.0/ !sub_main body write(*,*) 'main' write(*,*) ' args: ', arg01, arg02 write(*,*) ' locs: ', loc11, loc12 call sub_nested1 ! arg02 = func_nested2 write(*,*) ' args: ', arg01, arg02 write(*,*) ' locs: ', loc11, loc12 write(*,*) '/main' ! return !/sub_main body contains subroutine sub_nested1 implicit none real func_nested2 integer loc21/21/ real loc22/22.0/ !body sub_nested1 write(*,*) ' sub_nested1' write(*,*) ' args: ', arg01, arg02 write(*,*) ' locs: ', loc11, loc12 write(*,*) 'call func_nested2' loc12 = func_nested2 write(*,*) '/call func_nested2' write(*,*) ' args: ', arg01, arg02 write(*,*) ' locs: ', loc11, loc12 write(*,*) ' /sub_nested1' !/body sub_nested1 end subroutine sub_nested1 function func_nested2 implicit none real func_nested2 integer loc31/31/ real loc32/32.0/ !body func_nested2 !этих зелёных write'ов вообще не вижу... write(*,*) ' func_nested2' write(*,*) ' args: ', arg01, arg02 write(*,*) ' locs: ', loc11, loc12 func_nested2 = loc32 write(*,*) ' /func_nested2' ! func_nested2 = loc32 !/body func_nested2 end function func_nested2 end subroutine sub_main end module test !main use test implicit none integer arg01/01/ real arg02/2.0/ call sub_main(arg01, arg02) end | Всего записей: 24123 | Зарегистр. 06-12-2002 | Отправлено: 20:34 24-12-2010 | Исправлено: akaGM, 20:38 24-12-2010 |
|