自定义函数与自定义过程怎样互相调用? ( 积分: 10 )

  • 主题发起人 主题发起人 gxpcw
  • 开始时间 开始时间
G

gxpcw

Unregistered / Unconfirmed
GUEST, unregistred user!
.............&nbsp;<br>private<br>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Private&nbsp;declarations&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;procedure&nbsp;OpenCOM;<br>&nbsp;&nbsp;&nbsp;&nbsp;Function&nbsp;ReadDFunction&nbsp;ReadDM(channel:&nbsp;Array&nbsp;of&nbsp;Integer):&nbsp;string;<br>M(channel:&nbsp;Array&nbsp;of&nbsp;Integer):&nbsp;string;<br>&nbsp;&nbsp;public<br>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Public&nbsp;declarations&nbsp;}<br>&nbsp;&nbsp;end;<br>.............<br>Function&nbsp;ReadDM(channel:&nbsp;Array&nbsp;of&nbsp;Integer):&nbsp;string;<br>begin<br>.................<br>OpenCOM;<br>....................<br>end;<br>这样调用会出错:&nbsp;Undeclared&nbsp;identifier:&nbsp;'OpenCOM'
 
OpenCOM;前面要加上类名啊,老大
 
xxx.OpenCom<br>xxx是类下名称,比如Tinput&nbsp;=&nbsp;class(TForm)<br>就要改成Tinput.OpenCom
 
低级错误
 
后退
顶部