9d4258aa4736ab02aca6ff92c85e33a11d59b0df
* harbour/include/hbapicls.h
* harbour/source/vm/hvm.c
+ added hb_clsDoInit() function to initialize classy .prg functions
* harbour/source/compiler/complex.c
* allow to use NIL as class name
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyh
% optimize automatically var[0] declaration and generate the same
PCODE as for var:={}
* harbour/source/rtl/tscalar.prg
+ added HASH, POINTER and SYMBOL scalar classes
* changed NIL class to not use any instance variables
* harbour/source/vm/classes.c
+ added support for scalar classes. Now at startup classy code looks
for hb<TYPENAME> functions and try to execute them to register
scalar classes. It's Class(y) compatible behavior and only the prefix
of scalar ceases class function is different: 'CSY' in class(y) and
'HB' in Harbour, f.e.: hbNumeric()
If you prefer xHarbour like not automatic scalar class registration
with some PP commands:
ASSOCIATE CLASS <ClassName> WITH TYPE
ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
ENABLE CLASS TYPE ALL
ENABLE TYPE CLASS ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL
EXTEND [TYPE] ARRAY|BLOCK|CHARACTER|DATE|HASH|LOGICAL|NIL|
NUMERIC|POINTER|SYMBOL WITH METHOD <SomeFunc>
Then I can replace current code with it. If not then we should
divide scalar cases definitions into separated files to allow
easier overloading. I'm interesting in your opinions.
Description
Harbour Core — Reference source for Five development
Languages
C
80.3%
xBase
17.8%
Makefile
0.6%
C++
0.4%
Harbour
0.4%
Other
0.3%