* harbour/source/rdd/dbcmd.c
! update NetErr() in ordListAdd()
If you know other then dbCreate()/dbUseArea() functions which reset
NetErr() flag in Clipper then please report them. We will have to
update our functions (dbSetIndex() is a wrapper to ordListAdd() so
you nay not report it ;))
* harbour/source/rtl/gtstd/gtstd.c
* do not stop Harbour process when controlling terminal has TOSTOP
attribute set (as long as no direct out is done)
* harbour/source/rtl/tclass.prg
* harbour/source/rtl/terror.prg
* harbour/source/rtl/tobject.prg
* set valid class function
* harbour/source/rtl/tmenuitm.prg
* harbour/source/rtl/tpopup.prg
! I think that no one has been checking what these code does for
very long time. Both MenuItem() and PopUp() on each call tries
to create new _CLASSES_ called "MenuItem" and "PopUpMenu"
instead of creating only new instance of these classes (new objects)
Updated to use standard hbclass.ch commands. If possible try
to not create classes manually and always use documented commands
from hbclass.ch
* harbour/include/hbclass.ch
+ added validation for class data names. As additional preprocessor
rule to not use <!marker!>
* harbour/include/hboo.ch
* harbour/source/rtl/tclass.prg
* harbour/source/vm/classes.c
+ added delegate messages
* harbour/include/hbstack.h
* harbour/source/vm/arrays.c
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
* harbour/source/vm/proc.c
+ added startup symbol to hb_stack. It gives very good stop
condition for all procedures which trace stack calls and
resolves the problem with hb_stack.pBase which was never
pointing to valid function/procedure symbol when no symbol
was put on HVM stack. Now after hb_stackInit() the first
item is allocated for "hb_stackInit()" symbol so hb_stack.pBase
is always a pointer to valid function/procedure symbol.
* changed the guard condition for buggy code in hb_stackPop()
and similar code from:
hb_stack.pPos < hb_stack.pItems
to:
hb_stack.pPos <= hb_stack.pBase
The old condition was generating usable error message only in the
startup function. In deeply called functions it was only waste of
CPU time on one of the most often call functions. Before it was
activated internal stack structures were corrupted.
If we were leaving for many years without really working stack
underflow protection then maybe we should think about disabling
it at when HB_STACK_MACROS are used and keep it only in real
stack functions for HVM developers. Single protection in
hb_stackOldFrame() I've just added is enough for basic C code
validation.
I created the second version of stack macros without it in
hbstack.h but I would like to hear other developers opinion.
* harbour/include/hbclass.ch
* most of the rules rewritten
! fixed some wrong rules and general cleanup
+ added additional code validation
! fixed compilation of more then one class in single file.
Now it's even possible to declare all classes at beginning of
single file and then implementing their methods in any order
! fixed using static classes and classes
! fixed compilation without <ClassName>_ prefix in method names
+ added support for HB_CLS_NO_DECORATION macro which disable
adding <ClassName>_ prefix to method names - this macro is
set by default when HB_SHORTNAMES is set.
+ added support for declared parameters validation - it can be
disabled with HB_CLS_NO_PARAMS_ERR and I had to disable it
by default due to problems with our preprocessor.
Ryszard seems that our PP has serious problems with decoding
directives when there is no space between symbol and some other
non symbol character. I had to add some workarounds and even
introduce buggy rules to make it working. Please look at it.
You can remove #define HB_CLS_NO_PARAMS_ERR from hbclass.ch
and try to rebuild Harbour core code to see the problem.
* harbour/include/hboo.ch
* harbour/source/vm/classes.c
+ added support for new primitive message: HB_OO_MSG_PERFORM
* harbour/source/rtl/tclass.prg
- removed <lPersistent> parameter from HBClass messages and
internals data. Persistent is supported as scope bit and
separate variable was redundant.
- removed stripping of () from message names. Here is not a place
to fix wrong preprocessor rules.
* harbour/utils/hbtest/rt_class.prg
* use: METHOD PROCEDURE ... CALSS ...
instead of: PROCEDURE ... CALSS ...
The first version is preferable syntax.
* harbour/source/debug/dbgtmenu.prg
* harbour/source/rtl/checkbox.prg
! fixed some parameters in method declaration - global cleanup
will have to wait for preprocessor fixes
Hi all,
Please make test with current hbclass.ch code.
I hope that I haven't broken too much things ;-) but I rewrite
from scratch most rules and it's possible that I missed sth or
made some stupid typos. Current version is much shorter and should
be easier to updated. For sure I've intentionally changed one thing.
CLASSDATA was ignoring SHARED attribute and always created shared
class variables. Seems that it was long existing typo but the fix
may interact with already existing code which needs SHARED class
variables but does not use SHARED clause in CLASSDATA declaration.
In such case please update it and add missing SHARED.
Also in the end of CLASS declaration we have:
[ ; #translate Super( <SuperClassN> ): => ::<SuperClassN>: ] ;
[ ; #translate Super( <SuperClass1> ): => ::<SuperClass1>: ] ;
[ ; #translate Super(): => ::<SuperClass1>: ] ;
[ ; #translate Super: => ::<SuperClass1>: ] ;
[ ; #translate ::Super : => ::<SuperClass1>: ]
These rules introduce very serious bug - they are breaking supercasting
in code which makes sth like:
::super:super:super:msg
or in any other code which sends SUPER message to some other class
objects. I will have to remove them. At least the last three ones.
There were some other things I wanted to write about but it's too late
and I'm to tired - sorry. If you will have any question please ask. if
you will notice some problems with current rules please inform me.
* harbour/include/common.ch
- removed ISSYMBOL()
* harbour/source/rtl/tclass.prg
* use valtype() instead of IS*()
* some minor modifications
* harbour/source/vm/hvm.c
* minor modification
* harbour/include/common.ch
+ added ISSYMBOL()
* harbour/include/hbextern.ch
- removed __CLS_PARAM()
* harbour/include/hbclass.ch
* harbour/source/rtl/tclass.prg
* harbour/source/vm/classes.c
* replaced __CLS_PAR00() and __CLS_PARAM() functions by preprocessor
rules. These functions are not longer necessary though I left them
in classes.c for backward binary compatibility. Probably they will
be removed in the future.
! use function pointers (@<funcname>()) instead of function names
with REQUEST for super classes ID. It fixes using STATIC class
functions.
* harbour/make_rpm.sh
* check for rpmbuild also when BUGGY_RPM is set
* harbour/make_tgz.sh
* removed rebuild hbpptest with shared libraries
* harbour/include/hbapicls.h
+ added definitions for hb_clsCreate(), hb_clsAdd(), hb_clsAssociate()
* harbour/include/hbapierr.h
* harbour/source/rtl/errorapi.c
+ added hb_errFuncName - pseudo function name which can be used as
operation description in new error object. It should help to simplify
some code and fix function names when RT error is generated from C
function which can be executed from different .prg functions.
* harbour/include/hbclass.ch
+ added some missing Classy(y) compatible object variable type
descriptions: Int, Integer, Block
* harbour/source/rdd/dbfcdx/dbfcdx1.c
! disabled early retrieving from the cache key position and key count
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added: void hb_vmPushEvalSym( void ) for the code which do not
want to access any [P]HB_SYMB structures
* changed symbol name in hb_symEval from __EVAL to EVAL and modified
hb_symEval registration method to not register hb_vmDoBlock as global
function. Having PHB_DYNS address for "EVAL" in hb_symEval.pDynSym
allows to eliminate some strcmp() when we are looking for EVAL public
symbol.
! fixed symbol table updating in PCODE functions for future multi module
.hrb files
* harbour/source/vm/proc.c
* use hb_symEval.pDynSym instead of strcmp()
* harbour/source/vm/arrays.c
* harbour/source/vm/debug.c
* minor code cleanup
* harbour/source/rtl/tclass.prg
* harbour/source/vm/classes.c
% separate message hash table from methods table - it will cause farther
reduction of allocated memory - many thanks to all people who send
me statistics about number of used classes and symbols from their code.
% use hb_symEval.pDynSym
+ added support for object variable type scope checking like in Class(y).
! fixed typo in pushing object class variables by reference
% s_pClasses is now indexed directly by class handle
% some other optimiztions
! make hidden and non virtual invisible in child classes if it overloaded
some other non hidden method. In such case the overloaded method is used
and can be accessed.
! make friend functions real method class oriented not (super)object for
hidden messages
* harbour/include/hbclass.ch
* harbour/include/hbvm.h
* harbour/source/rtl/tclass.prg
* harbour/source/vm/classes.c
* harbour/source/vm/hvm.c
! fixed bug in real codeblock scoping which was exploited by
dictionary resizing
* changed ACCESS messages to ASSIGN ones when object item
reference is created for proper READONLY scope checking.
The reference to object variable can be created only when
caller has sufficient ASSIGN privileges.
+ added FRIEND CLASS and FRIEND FUNCTION support.
It's enough to add class definition:
FRIEND CLASS <classFunc1> [, <classFuncN> ]
and/or:
FRIEND FUNCTION <FuncName1> [, <FuncNameN> ]
and all methods of given class or given function will be able
to access private variables.
Warning!!! Friends cannot access overloaded non virtual methods.
This feature is available _ONLY_ for real class members.
+ added MODULE FRIENDLY to class definition. It causes that all other
functions and classes defined in the same .prg module will have
friend privileges. In such way works xHarbour and there is now way
to disable this "feature" what is IMHO bug. In Harbour programmer
has to explicitly enable it (until he will not change / add new
preprocessor rule and set it as default ;-)). Syntax:
CREATE CLASS .... MODULE FRIENDLY
...
END CLASS
* harbour/source/vm/proc.c
* harbour/source/vm/runner.c
* updated function symbols processing
* harbour/source/compiler/harbour.c
* added note in hb_compOptimizeFrames() about exceeding maximum number
of local variables (255). We should add new pcode(s) HB_P_LARGE[V]FRAME
or generate compile time error.
* harbour/source/vm/macro.c
% minor optimizations
+ harbour/doc/destruct.txt
+ added description for object destructors in Harbour
* harbour/include/error.ch
+ added new error code EG_DESTRUCTOR
* harbour/source/lang/msgpl852.c
* harbour/source/lang/msgpliso.c
* harbour/source/lang/msgplmaz.c
* harbour/source/lang/msgplwin.c
* harbour/source/rtl/langapi.c
+ added desription for new error code - other language modules
have to be updated
* harbour/include/hbapi.h
+ added hb_gcRefCheck() and cover some hb_gc* functions by
_HB_API_INTERNAL_ macro
* harbour/source/vm/itemapi.c
! fixed possible RT error generation when some exception is active
* harbour/include/hbapicls.h
* harbour/include/hbclass.ch
* harbour/include/hboo.ch
* harbour/source/rtl/tclass.prg
* harbour/source/vm/arrays.c
* harbour/source/vm/classes.c
+ added support for object destructors
* harbour/source/vm/garbage.c
+ added support for object destructors
+ added logic to detect buggu .prg code which uses destructors
see doc/destruct.txt for more info.
It's also possible that this code will exploit some bugs
in other code which uses GC allocated memory blocks.
* harbour/include/hbapicls.ch
* added HB_EXPORT to public functions and some internal covered by
_HB_API_INTERNAL_ macro
* harbour/include/hboo.ch
+ added HB_OO_CLSTP_NONVIRTUAL and HB_OO_CLSTP_OVERLOADED
* harbour/source/rtl/tclass.prg
! do not add supercast class messages - now it's done automatically
by __clsNew() function with proper instance area offset updating
! enumerate instance class datas in __clsAddMsg() from 1 - inherited
instance variables are managed internally by classy code with
proper instance area offset updating
! use __CLS_CNTCLSDATA() as start offset for class data. Do not
try to calculate it yourself - some of super classes can be ignored
when they are appear in the inheritance tree more then once so it's
not possible to calculate class data or instance data start offset
using simple sum of class or instance variables in super classes.
* harbour/source/vm/classes.c
! fixed instance area casting
! fixed class variables casting
! fixed multi-inheritance when the same class can apear more then
once in super classes tree.
! Do not add unnecessary instance variables for the same class when
it's inherited more then once.
! Do not add unnecessary class variables for the same class when
it's inherited more then once.
! Do not add unnecessary initialization class and instance variables
+ added support for non virtual messages
+ added support for static and casted scoping
+ super cast messages added automatically. They are used to dynamic
recalculation of instance are offsets and to avoid multiple inheritance
of the same class so please do not overload them or you will have as
result something what we have before recent modifications in the
instance and class data area. Just simply run tests/clsccast.prg
and tests/clsicast.prg compiled with current CVS code and last
release code or with xHarbour and compare the results.
Also Class(y) does not pass these tests and I do not know if any
other dynamic OOP model in xbase languages can properly address it.
BTW maybe I should add RT error when .prg code will try to delete
or overwrite class cast message. For me it seems to be reasonable
and what's your opinion?
* make hidden class members non virtual by default. It can be disabled
by compiling classes.c with -DHB_VIRTUAL_HIDDEN but IMHO keeping
HIDDEN members as virtual causes that they are not really HIDDEN
because subclasses can simply overwrite them. It also means that
it's not possible to create class with some private data and
methods which will never interact with any subclass code created
by other programmers where name conflict can appear. So one of
the most important OOP features is missing in such case.
See tests/clsnv.prg as an example for non virtual hidden members.
+ tests/clsicast.prg
+ added test code for proper instance area allocating and casting
+ tests/clsccast.prg
+ added test code for proper class data allocating and casting
+ tests/clsnv.prg
+ added test code for non virtual hidden class members
Now we should be able to create and class model even replicate the
static one like in C++ using current class engine which still fully
supports dynamic bindings. It consumes less memory and due to much
more efficient hashing it should be faster then it was though some
other minor optimization can be add and I'll plan to make them in
some spare time.
The item type verification in assignment is still missing. I'll add
it when I'll collect some statistic informantion I'd like to ask
[x]Harbour users. I need these information to tune some internal
structures where I can balance between speed and memory allocation
to statistically optimal form.
Marek asked me to add passing object datas by reference and I'll do
that but I'd like to ask Ryszard to add support for:
@<oVar>:<message>
to compiler. I'll implement all other HVM modifications. If you can
please also add support for:
<oVar>:&<cMsgName>[(...)]
For this we do not need any HVM modifications or new PCODEs.
We are supporting xBase++ macro list compilation in:
cList:="1,2,3"
x := aVar[ &cList ]
aVar:={ &cList }
func( &cList )
But we do not support:
<oVar>:<message>( &cList )
IMHO it looks ugly. If we have this syntax for function call then we
should also support it in message sending.
Ryszard can you make necessary compiler modifications?
I'm also thinking about adding support for variable parameters
func myfunc(...)
[...]
return xVar
In few cases it will help to encode some function much more efficient
then now.
I'll add Class(y) compatible functions used in class(y) header files
so it will be possible to use original class(y) .ch files in Harbour
though it will not be the most efficient because we have @func() operator
which gives better performance then using codeblocks. Anyhow classy
create separate meta class for each class with CLASS members and
<clasName>() function always return such meta class object so for full
Class(y) compatibility we need to generate differ .prg code.
But all such modifications now can be done on preprocessor and
.prg level and they will not need .c code modification.
We should make them to give user interface for our new OOP features.
Now I'm waiting for reports about any problems with current classy
code.
* harbour/include/hbapi.h
* harbour/source/vm/hvm.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/arrays.c
* moved static base offset from hb_struBlock structure
to HB_CODEBLOCK structure
+ added hclass member to hb_struBlock - it will be used in
the future for checking codeblock scope in classy so we will
real scope checking also for messages sent from codeblocks.
- removed supercast and superoffset members from hb_struArray
structure.
* harbour/include/hbclass.ch
* added class(y) like
@:<MessageName>([<MsgParams,...>])
send operator. It's not exactly the same as in class(y) where
this operator is hardcoded to executing function directly,
needs method name instead of message name and is linked statically.
In Harbour this operator uses message name so can be used also for
instance variables and make dynamic casting to the class from which
current method is inherited. In short words sending messages to @:
instead of :: causes that they work like non-virtual messages in
C++ mode.
If you do not use the same method body in different classes
then you can also use explicitly self casting:
::<myclass>:<msgname>[(...)]
and it will be a little bit faster
* harbour/include/hboo.ch
+ added: HB_OO_MSG_ASSIGN, HB_OO_MSG_ACCESS,
HB_OO_MSG_CLSASSIGN, HB_OO_MSG_CLSACCESS
They should be used insted of HB_OO_MSG_DATA and HB_OO_MSG_CLSDATA
This resolves problems with name conflicts when we were detecting
type of message (ACCESS/ASSIGN) by checking the first character
in message name. F.e. now it's possible to create exported instance
variable called __WithObject and it will be used in all WITH OBJECT
statement instead of the base object value. It's simple and effective
WITH OBJECT overloading.
I kept backward compatibility for HB_OO_MSG_DATA and HB_OO_MSG_CLSDATA
but I strongly suggest to update code to use new constants.
+ added HB_OO_MSG_REALCLASS
* harbour/source/rtl/objfunc.prg
* harbour/source/rtl/tobject.prg
* harbour/source/rtl/tclass.prg
* use HB_OO_MSG_[CLS]{ASSIGN,ACCESS} instead of HB_OO_MSG_[CLS]DATA
* harbour/source/rtl/tclass.prg
+ added REALCLASS message to creted classes - it's used for @: operator
* harbour/source/vm/classes.c
* updated for above modifications
* calculate instance area offset in supercasting dynamically - it
will allow to eliminate multiple instance area allocating when
in the inheritance tree the same class exists more then once and
also quite easy add support for non-virtual messages.
! fixed GPF in __CLSINSTSUPER() class function generate HVM exception
% do not inherit unaccessible inline blocks
* some other minor optimization, fixes and code cleanups
* harbour/source/rdd/usrrdd/usrrdd.c
! fixed HB_TRACE message
* harbour/source/rtl/errorapi.c
! generate internal error if ErrorNew() function does not return an object
* harbour/source/lang/msgcs852.c
* harbour/source/lang/msgcsiso.c
* harbour/source/lang/msgcskam.c
* harbour/source/lang/msgcswin.c
* typo fixed (Vojtech Obrdlik <vobrdlik centrum.cz>)
* harbour/include/hbapicdp.h
* harbour/source/codepage/Makefile
+ harbour/source/codepage/cpcs852.c
+ harbour/source/codepage/cpcsiso.c
+ harbour/source/codepage/cpcskam.c
+ harbour/source/codepage/cpcswin.c
+ harbour/source/codepage/uckam.c
* harbour/doc/en/lang.txt
* harbour/common.mak
+ added czech codepage support (Vojtech Obrdlik <vobrdlik centrum.cz>)
Vojtech many thanks.
We will have to fix our CDP code to work well with characters
with the same wight - now sorting with such codepages does not
work correctly, f.e. in CSISO:
CHR(65)+CHR(204) > CHR(65)+CHR(201)
but:
CHR(65)+CHR(201) >= CHR(65)+CHR(204)
as you can see comparison depends on string order:
s1 > s2 but not s2 < s1
It means that such codepages cannot be used in any sorting
systems like indexes until we will not fix internal CPD logic.
Alexander can you look at it?
If not then please inform me and I'll work on it in some spare
time.
* harbour/source/rtl/do.c
* minor RTE message simplification
* harbour/source/rtl/gtos2/gtos2.c
* casting
* harbour/source/vm/dynsym.c
+ added __DYNSN2SYM( <cName> ) -> symbolItem
* harbour/include/hbapi.h
* harbour/source/vm/arrays.c
+ added supercast and superoffset members to hb_struArray structure
* harbour/source/vm/classes.c
* harbour/source/rtl/tclass.prg
! fixed calculation of instance area offsets
! fixed accessing instance variables with super casting
+ added selfclass casting
+ added support for sending 'exec' and 'name' messages to
symbol items, f.e.:
funcSym := (@funcName())
? "Exacuting:", funcSym:name
funcSym:exec( param1, param2, ... )
* changed __CLASSNAME() to be Clipper compatible
* changed __CLSINST()/__CLASSINSTANCE() now accepts as third paramter
function name - Clipper compatible
! fixed GPF trap in __OBJGETCLSNAME() when executed with wrong parameter
* some other fixes and small speed improvement
* harbour/include/common.ch
* harbour/source/debug/dbghelp.prg
* harbour/source/debug/dbgmenu.prg
* harbour/source/debug/dbgtarr.prg
* harbour/source/debug/dbgtobj.prg
* harbour/source/debug/dbgwa.prg
* harbour/source/debug/debugger.prg
* harbour/source/rdd/dbupdat.prg
* harbour/source/rtl/achoice.prg
* harbour/source/rtl/checkbox.prg
* harbour/source/rtl/dbedit.prg
* harbour/source/rtl/getsys.prg
* harbour/source/rtl/listbox.prg
* harbour/source/rtl/persist.prg
* harbour/source/rtl/pushbtn.prg
* harbour/source/rtl/radiobtn.prg
* harbour/source/rtl/tbcolumn.prg
* harbour/source/rtl/tbrowse.prg
* harbour/source/rtl/tclass.prg
* harbour/source/rtl/teditor.prg
* harbour/source/rtl/tget.prg
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/tlabel.prg
* harbour/source/rtl/treport.prg
* harbour/utils/hbdoc/genchm.prg
* harbour/utils/hbdoc/genhtm.prg
* harbour/utils/hbdoc/genng.prg
* harbour/utils/hbdoc/genos2.prg
* harbour/utils/hbdoc/genrtf.prg
* harbour/utils/hbdoc/gentrf.prg
* harbour/utils/hbdoc/html.prg
* harbour/utils/hbdoc/ng.prg
* harbour/utils/hbdoc/os2.prg
* harbour/utils/hbdoc/rtf.prg
* harbour/utils/hbmake/checks.prg
* harbour/utils/hbmake/hbmake.prg
* harbour/utils/hbmake/hbmutils.prg
* harbour/utils/hbmake/radios.prg
* harbour/utils/hbtest/rt_hvm.prg
+ HB_SYMBOL_UNUSED() added for .prg code. It can suppress unused
var warnings where applicable. The code won't generate any final
pcodes, so it won't cause overhead. The only current downside
is that it cannot be used inside codeblocks.
! Fixed a number (>200) of declared but unused variable /w2 error.
All parts were scanned and fixed (except contrib).
Note that there are several false "unreachable code" warnings,
and there are still quite a few unused var warnings inside
codeblocks. After fixing these /w2 switch could be added to
the standard build process to maintain code quality.
* include/hbclass.ch
% Removed numerous redundant rules.
+ Added logic to detect and raise #error on implementation of NON Declared method.
* source/rtl/tclass.prg
+ Added logic to dispose of posibble "(...)" suffix to Method Name in AddVirtual(), AddMethod(), and AddClsMethod().
* source/rtl/tbrowse.prg
- removed hidden: clause inside class definition (it doesn't work right now)
* source/rtl/tclass.prg
- commented out line 255 (gives infinite loop)
* utils/hbmake/*.prg
+ hbdocdef.ch needs relative path ("..\hbdoc\") to be compiled by gcc system
*harbour/include/hbclass.ch
Now support MI, scoping, fowarding and delegating
Also support 10 chars limit by not prefixing the Classname when in 10 chars mode
*harbour/include/hbsetup.ch
Allow the configuration of Hidden message
*harbour/source/rtl/objfunc.prg
added function __objDerivedFrom(oSelf, oObj | cClassName)
*harbour/source/rtl/tclass.prg
Major modification to implement MI & scoping
Added message :Super to acces frist superclass object instance
Added message :IsDerivedFrom(oObj | cClassName ) (Xbase++ comp.)
*harbour/source/vm/proc.c
added char * hb_procname( int iLevel, char * szName )
extracted from HB_FUNC( PROCNAME ) to allow it to be called from c
HB_FUNC( PROCNAME ) modified to call the previous'one
*harbour/source/vm/classes.c
Major modification to implement MI & Scoping
Added function Sender() used by delegating to allow full polymorphism
Added function __CLS_PARAM used by the preprocessor
* source/compiler/harbour.c
+ Added code to main() to process symbols and look for the first symbol in the prg and give it scope HB_FS_FIRST
* source/compiler/genc.c
+ Added check for HB_FS_FIRST in the symbol processing loop, and output to the symbol table.
* source/vm/hvm.c
! Fixed bug where if first symbol was an init symbol, it got executed twice.
* source/vm/runner.c
+ Added logic to look for first symbol, to provide correct startup.
! Fixed bug where if first symbol was an init symbol, it got executed twice.
* source/rtl/tclass.prg
! Corrected minor typo in HB_Structure()
* tests/teststru.prg
! Corrected minor typo.
+ tests/testinit.prg
+ Added file to test proper startup processing.
* source/compiler/harbour.l
+ Added "as structure", "as stru", "as array of structure", "as array of stru"
* source/compiler/hbpcode.c
* Improved some logic in hb_StrongType()
* source/vm/hvm.c
! Corrected startup symbol when having to use Main() as per Ryszard.
* source/pp/pptable.c
+ Added the equivalent of:
#COMMANDS STRUCTURE <StruName> <Var1> AS <Type1> [, <VarN> AS <TypeN> ] => ;
STATIC __<StruName> := {|| IF( __<StruName> == NIL, , ) , HB_Structure( <"StruName">, { <"Var1"> [, <"VarN">] } )} ;;
DECLARE <StruName> <Var1> AS <Type1> [ <VarN> AS <TypeN> ] ;;
#TRANSLATE AS NEW <ClassName> => AS CLASS <StruName> := ( Eval( __<StruName> ), HB_Structure( <StruName> ) )
#TRANSLATE AS NEW <ClassName> => AS CLASS <ClassName> := <ClassName>():New()
* source/rtl/tclass.prg
+ Added Function HB_Structure() ( Fully Declared! ) This function is used internally, but may be freely called from Clipper level.
It Aceepts Parameter 1 Structure Name, and optional parameter 2, as array of structure variable names.
If called with 2nd parameter, returns NIL (just creates the new Structure), if called with just parameter 1, it returns
new instance of defined structure.
+ tests\teststru.prg
+ Added demo for new structure syntax