Found this: --- 2006-10-04 02:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) ... * harbour/utils/hbtest/rt_class.prg * use: METHOD PROCEDURE ... CALSS ... instead of: PROCEDURE ... CALSS ... The first version is preferable syntax. ... ---
--- test.prg #include "hbclass.ch" PROCEDURE MAIN() Hello():Test( "hello world" ) RETURN CREATE CLASS Hello // METHOD PROCEDURE Test( c ) /* <---- Compiler error */ METHOD Test( c ) /* This works */ END CLASS METHOD PROCEDURE Test( c ) CLASS Hello ? c RETURN --- This is the closest to consistent syntax I could find. I'm not sure why METHOD PROCEDURE doesn't work in class declaration, it's probably for a reason. Brgds, Viktor 2009/6/21 toni...@fwi <toninho...@yahoo.com.br>: > Hi Viktor > >>This is good, but in this case IMO METHOD declaration and >>definition should use some sort of consistent syntax. >> >>Declaring as METHOD and implementing as PROCEDURE is >>very sloppy. > > I 100% agree with you but IIRC this problem was discussed in past. I > don't remember why we choice for METHOD in declaration and PROCEDURE > in implementation. > >>If someone knows the consistent syntax, we can use it, it >>would surely be a bit faster than FUNCTION + RETURN NIL. >>Maybe METHOD PROCEDURE? I can't remember. > > I don't remember too... > > > Thanks and best regards, > > Toninho. > > __________________________________________________ > Faça ligações para outros computadores com o novo Yahoo! Messenger > http://br.beta.messenger.yahoo.com/ > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour