From bf1bd7feb470c59600fde7f2628b6c4b6da0ae54 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Mon, 12 Jul 1999 14:26:14 +0000 Subject: [PATCH] // Testing Harbour classes.ch commands --- harbour/tests/working/classch.prg | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 harbour/tests/working/classch.prg diff --git a/harbour/tests/working/classch.prg b/harbour/tests/working/classch.prg new file mode 100644 index 0000000000..0c803b66ea --- /dev/null +++ b/harbour/tests/working/classch.prg @@ -0,0 +1,40 @@ +// Testing Harbour classes.ch commands + +#include "classes.ch" + +//--------------------------------------------------------------------// + +function Main() + + local o := TTest():New( "one", "two" ) + + ? o:ClassName() + ? o:One + ? o:Two + + o:Test() + +return nil + +//--------------------------------------------------------------------// + +CLASS TTest + + DATA One, Two, Three + + METHOD New( One, Two ) + + METHOD Test() INLINE QOut( "Hello" ) + +ENDCLASS + +//--------------------------------------------------------------------// + +METHOD New( One, Two ) CLASS TTest + + ::One = One + ::Two = Two + +return Self + +//--------------------------------------------------------------------//