Page 1 of 1

method syntax

Posted: Wed Jan 04, 2006 6:30 pm
by modicr
I'm porting large OO app from Clipper Fivewin.

Is it possible to declare several methods in just one line,
like this:

Code: Select all

CLASS T3DOBJ

   DATA   aVertex
   DATA   aFaces

   METHOD New() CONSTRUCTOR

   METHOD AddVertex(), Paint()
//    METHOD Paint()

ENDCLASS
At the moment, harbour compiler does not like
this (Syntax error: parse error at ...)

Thanks, Roman

Posted: Thu Jan 05, 2006 12:57 am
by R.F.
No, if you check the hbclass.ch header file, you will notice that METHOD is a single line directive.

Posted: Thu Jan 05, 2006 12:41 pm
by Antonio Linares
Roman,

You may modify Harbour hbclass.ch and implement it for you.

Posted: Thu Jan 05, 2006 1:31 pm
by modicr
I think it will be faster if I manually change source of our modules.

I looked into objects.ch to see how you implemented "method" in FW
for clipper and it seems quite complicated.

Roman

Posted: Thu Jan 05, 2006 4:12 pm
by Antonio Linares
Roman,

FWH does not use objects.ch, just hbclass.ch which it is much more simple.