Files
harbour-core/tests/classch.prg
vszakats a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00

57 lines
585 B
Plaintext

/*
* $Id$
*/
// Testing Harbour hbclass.ch commands
#include "hbclass.ch"
PROCEDURE Main()
LOCAL o := TTest():New( "one", "two" )
? o:ClassName()
? o:One
? o:Two
o:Test()
RETURN
// ;
CREATE CLASS TTest INHERIT TParent
VAR 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
// ;
CREATE CLASS TParent
VAR One
METHOD New()
ENDCLASS
METHOD New() CLASS TParent
? "TParent:New()"
RETURN Self