为什么这个程序会出现“Variable does not exist:SUPER"的错误信息呢?
使用HMG3.4.3编译.
Why does this program will appear "Variable does not exist: SUPER" error message?
Compile with HMG3.4.3.
Code: Select all
REQUEST HB_GT_WIN_DEFAULT
function Main()
local o
local p
setmode(25,80)
cls
o:= TTest():New( "one", "two" )
? o:ClassName()
? o:One
? o:Two
o:Test()
return nil
#include "hbclass.ch"
CLASS TParent
DATA One
METHOD New()
ENDCLASS
//--------------------------------------------------------------------//
METHOD New() CLASS TParent
? "TParent"
return Self
//-------
CLASS TTest INHERIT TParent
DATA One, Two, Three
METHOD New( One, Two )
METHOD Test() INLINE QOut( "Hello" )
ENDCLASS
//--------------------------------------------------------------------//
METHOD New( One, Two ) CLASS TTest
super:New()
::One := One
::Two := Two
return Self