主题:多层子程序参数传递问题 access violation!
程序如下:
program ee
...
call sub1(3,SHUZU1,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
end ee
subroutine sub1()
...
call sub2(3,SHUZU5,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
...
call sub3(3,SHUZU6,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
...
call sub4(SHUZU5,SHUZU6,BIANLIANG1)
...
...
call sub3(3,SHUZU6,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
end
程序调试时出现access violation!在调试时发现程序运行到sub2时,提示BIANLIANG1,SHUZU2,SHUZU3,SHUZU4等变量出现“Undefined address!”但程序都对其进行声明了!不知何故?!
program ee
...
call sub1(3,SHUZU1,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
end ee
subroutine sub1()
...
call sub2(3,SHUZU5,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
...
call sub3(3,SHUZU6,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
...
call sub4(SHUZU5,SHUZU6,BIANLIANG1)
...
...
call sub3(3,SHUZU6,BIANLIANG1,SHUZU2,SHUZU3,SHUZU4)
...
end
程序调试时出现access violation!在调试时发现程序运行到sub2时,提示BIANLIANG1,SHUZU2,SHUZU3,SHUZU4等变量出现“Undefined address!”但程序都对其进行声明了!不知何故?!