Page 1 of 1

CLASS Code Syntax with HMG vs. Xbase++

Posted: Thu Jul 22, 2021 12:35 am
by AUGE_OHR
hi,

i have to learn about Difference of HMG and Xbase++ CLASS Code Syntax

Code: Select all

   METHOD   setTabstops()                         VIRTUAL
   METHOD   itemMarked( ... )                     SETGET
what does VIRTUAL mean :?:
under Xbase++ i have ACCESS ASSIGN. is that the same like SETGET :?:

"where" can i read more about HMG CLASS Syntax :idea:

Re: CLASS Code Syntax with HMG vs. Xbase++

Posted: Thu Jul 22, 2021 3:10 am
by Rathinagiri
I think there is nothing called HMG CLASS syntax. It is Harbour Class only.

I think you can get more info from https://harbour.github.io/doc/harbour.html#class-cmd

Re: CLASS Code Syntax with HMG vs. Xbase++

Posted: Thu Jul 22, 2021 3:16 am
by Rathinagiri
As per Harbour Doc:

VIRTUAL Methods that do nothing. Useful for Base classes where

the child class will define the method's behavior, or when you are first creating and testing a Class.

Re: CLASS Code Syntax with HMG vs. Xbase++

Posted: Thu Jul 22, 2021 10:47 am
by gfilatov
AUGE_OHR wrote: Thu Jul 22, 2021 12:35 am hi,
...
under Xbase++ i have ACCESS ASSIGN. is that the same like SETGET :?:
...
Hi,

Yes, it is.

Example code:

Code: Select all

CLASS XbpReg
      ...
      /*ACCESS ASSIGN*/ METHOD Standard SETGET
      /*ACCESS ASSIGN*/ METHOD ReadBinType SETGET     // get/set ::cReadBinaryTypeAs
      /*ACCESS ASSIGN*/ METHOD SaveStringType SETGET  // get/set ::cSaveStringTypeAs
      ...