* source/rtl/isprint.c
! Fixed ISPRINTER() on Win32 after last changes.
Thanks Guillermo, pls test now.
* source/rdd/dbcmd.c
! Marked as HB_EXTENSION: FIELDLEN(), FIELDDEC(), FIELDTYPE()
* include/hbextern.ch
* source/rdd/dbcmd.c
! Marked as HB_EXTENSION: DBDROP(), DBEXISTS(), RDDINFO()
(they were properly marked in hbextern.ch but not in source)
* include/hbextern.ch
* source/rtl/disksphb.c
* source/rtl/fssize.c
* source/rtl/fstemp.c
* source/rtl/inkey.c
* source/rtl/oemansi.c
* source/rtl/philes.c
* source/rtl/setcolor.c
* source/rtl/setfunc.prg
* source/rtl/setkey.c
* source/rtl/shadow.c
* source/rtl/trace.c
* source/rtl/valtostr.c
* source/vm/dynsym.c
+ Removed HB_EXTENSION from all the .prg level functions
prefixed with HB_.
(there was a mixed situation here, but there's no need
to mark any HB_ functions as extensions, as it's obvious
by their name. So as a rule, no HB_ prefixed function
should ever be marked as HB_EXTENSION anymore.)
! Fixed some inconsistencies in HB_EXTENSION between
hbextern.ch and actual sources.
* source/rtl/tgetlist.prg
* One HB_EXTENSION changed to !HB_C52_STRICT because it
was guarding a bugfix rather than a real extension.
* source/rtl/gui.prg
* _GetNumCol() is now always strictly compatible.
NOTE added about sloppy C5.3 behaviour.
* source/rtl/inkey.c
* contrib/xhb/xhb.ch
* contrib/xhb/xhbfunc.c
! __KEYBOARD() xhb hidden parameter extension moved to
xhb lib. For similar functionality inside Harbour
pls use HB_KEYPUT(). __KEYBOARD is now 100% C5.x
compatible.
* source/rtl/setfunc.prg
* __SetFunction() extension now uses HB_KEYPUT() instead
of __KEYBOARD() extended parameters.
* source/compiler/hbfunchk.c
* source/rtl/at.c
! AT() extra parameters handled when HB_EXTENSION is on
(was !HB_C52_STRICT). (The first extra parameter is
XPP and Flagship compatible. The three parameter version
of this function is called AT3() in CAVO.)
! TRIM()/RTRIM() extra parameters handled on compiler level
when HB_EXTENSION is on (default).
! FILE() parameter check turned off in compiler.
(to be C5.x compatible)
* source/rtl/alert.prg
! ALERT() Harbour extended parameter (1st parameter type)
is now guarded with HB_EXTENSION instead of HB_C52_STRICT.
* source/rtl/gete.c
! GETE[NV]() Harbour extended parameter guarded with HB_EXTENSION.
* source/vm/proc.c
! PROCFILE() Harbour extended parameter guarded with HB_EXTENSION.
* source/rtl/mlcfunc.c
! Harbour extended parameters for MEMOLINE()/MLCOUNT()/
MLPOS()/MLCTOPOS()/MPOSTOLC() are now guarded with HB_EXTENSION
(instead of HB_C52_STRICT). It seems to be possible to
specify custom EOLs for all these functions. (Maybe simple
automatic Unix/Win EOL style handling would be better here)
* source/vm/memvars.c
! Guarded Harbour extension in __MVRESTORE() with HB_EXTENSION.
; After this cleanup:
- HB_EXTENSION is marking extra features living inside existing C5.x
functions or classes, or Harbour extension functions
not complying with the HB_ prefix rule (we have six
such functions in RDD). If there are more extended
parameters in Harbour pls mark them with HB_EXTENSION
too.
- HB_C52_STRICT is guarding bugfixes compared to C5.x.
- No HB_ functions are guarded with HB_EXTENSION anymore.
- We'd pbly need to review each HB_EXTENSIONs to check whether they
are safe or not.
- A list of HB_EXTENSIONs:
- MLCOUNT()
MEMOLINE()
MLPOS()
MLCPOS()
MPOSTOLC() - 5th and up can specify custom EOLs.
- ALERT() - 1st parameter type can be any type in Harbour, char only in C5.x
- SET FUNCTION TO
__SETFUNCTION - 2nd parameter can be numeric or array of numeric in Harbour.
- SETKEY() - 3rd codeblock parameter ("isactive" block)
- SAVESCREEN() - 5th parameter: lNoCheck (?)
RESTSCREEN() - 6th parameter: lNoCheck (?)
- AT() - 3rd and 4th parameters to set search range. 3rd parameter is
also supported by XPP and FS. Results in compiler error in C5.x.
(CAVO uses AT2() and AT3() for extended versions.)
- TRIM()
RTRIM() - 2nd parameter is an extension regarding space trimming mode.
Results in compiler error in C5.x.
- ALLTRIM() - 2nd parameter is an extension regarding space trimming mode.
- GETE()
GETENV() - 2nd parameter specifies a default value. Can be found in HB_GETENV().
- PROCFILE() - 1st parameter is a Harbour extension. Undocumented function in C5.x.
The extension looks similar to the one found in Flagship.
- __MVRESTORE() - 3rd/4th parameters are Harbour extensions to set variable name
mask. Redirected from the internal 5.x function named __MRESTORE().
- DB*() - cRDD, nConnection, cCodePage extra parameters in many DB*() functions.
TOFIX: None of them is marked as HB_EXTENSION.
- SET()s - These are not marked as HB_EXTENSION.
- ? - Is there anything else?
* include/hbextern.ch
* source/rtl/gete.c
+ Added HB_GETENV(). There you have a 2nd parameter
which will be returned in case the requested
envvar doesn't exist. This extensions is still present
in GETE[NV](), but we'd better remove it.
* include/hbextern.ch
* source/rtl/isprint.c
+ Added HB_ISPRINTER() with support for extra parameter
printer port name. This parameter also currently has
support for Win32 printers. Win32 printer name support
was removed from ISPRINTER() to keep compatibility.
ISPRINTER() extra parameter is enabled with HB_COMPAT_XPP
(which is the default).
* source/rtl/tbcolumn.prg
! Strict C5.2e compatible behaviour made the default.
* source/rtl/inkey.c
+ Added handling of arrays of numbers in HB_KEYPUT().
(this was copied from __KEYBOARD()'s extended section)
+ Added handling of string parameter in HB_KEYPUT().
(this way we don't really need the hidden extensions
in __KEYBOARD() anymore. Also notice that __KEYBOARD()
doesn't clear the keyboard buffer when numeric or
array is passed, which is not consistent with the
Clipper compatible behaviour when strings are passed.)
* common.mak
* include/hbcompdf.h
* source/compiler/hbmain.c
* source/compiler/cmdcheck.c
* source/compiler/hbcomp.c
* source/compiler/harbour.l
* source/compiler/Makefile
* source/compiler/ppcomp.c
* source/compiler/hbusage.c
- source/compiler/genjava.c
- source/compiler/gencli.c
- Removed two non-working (experimental) output types:
Java, CLI
! Prefixed LANG_* enums with HB_
* harbour/doc/destruct.txt
* update description for multiple inherited destructors
* harbour/source/compiler/complex.c
* _HB_CLASS and _HB_MEMBER are not longer reserved words
* harbour/include/hbclass.ch
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/macro/macro.y
* harbour/source/compiler/harbour.y
* formatting and minor code cleanup
* harbour/source/compiler/hbusage.c
* added missing information about -undef:<id> switch to usage
description
* harbour/source/compiler/gencc.c
! fixed bug reported by Teo in code generated for SWITCH statement
* harbour/source/vm/runner.c
* harbour/source/compiler/genhrb.c
! added support for functions marked as DYNAMIC in .hrb format
* harbour/source/compiler/complex.c
+ finished code (stil disabled) to decode datetime in
VFP strict date form
* harbour/source/vm/dynsym.c
* minor optimzation
* harbour/tests/multifnc/t0.prg
* harbour/tests/multifnc/t1.prg
* harbour/tests/multifnc/t2.prg
+ one more test for function overload
* harbour/source/vm/hvm.c
* do not clear references to public functions in symbol tables used
by unloaded modules
* harbour/source/compiler/complex.c
+ added disabled yet code to decode datetime in VFP strict date form
{^YYYY/MM/DD[,][HH[:MM[:SS[.CCC]]][A|P]]}
It's for future datetime implementation.
* contrib/xhb/hbcompat.ch
* contrib/xhb/xhb.ch
+ Moved lines which do not need xhb lib itself from xhb.ch to hbcompat.ch.
xhb.ch now includes hbcompat.ch and not vice versa.
So now hbcompat.ch can be used as a "lighter" compatibility
layer which doesn't need the lib binary. Pls test.
* contrib/mysql/tmysql.prg
* contrib/mysql/tsqlbrw.prg
* contrib/mysql/Makefile
! Applied MySQL lib patch on behalf of Guy Roussin.
* harbour/source/vm/arrays.c
! fixed value returned by HB_RASCAN( aVal, bCode ) - it was returning
index -1, f.e. hb_rascan({1,2,3},{|x|x==2}) returned 1 when it
should 2
* contrib/tip/thtml.prg
* contrib/tip/cgi.prg
* contrib/tip/httpcln.prg
* removed HB_HSetAutoAdd, now Harbour hashes by default have AUTOADD on assign.
* harbour/source/vm/hashes.c
* set AUTOADD for assign operation by default in new arrays
* removed last HB_COMPAT_XHB
* harbour/source/vm/hashfunc.c
* change HB_HAUTOADD( hHash, .T. ) to set AUTOADD for assign only
when no default value is set
Above are minimal modifications to make default Harbour behavior
more similar to other languages f.e. PHP or xHarbour. Other
modifications will depend on group decision.
* harbour/include/hbsetup.h
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* cleanup
* harbour/source/vm/hvm.c
% use extended reference for enumerator destructor - it eliminates
3 hb_itemNew() calls reducing the cost of creating FOR EACH envelope
about 40%
* harbour/source/vm/dynsym.c
* added some additional comments. I still do not know MSVC behavior
can someone check the results from tests/multifnc in MS[V]C build?
+ harbour/tests/oleenum.prg
+ added Enrico example and test code for enumerators and OLE objects
* harbour/contrib/Makefile
* enabled hbole, ado_rdd, hybodbc in most of Windows builds
* harbour/contrib/ole2/win32ole.prg
* harbour/contrib/ole2/w32ole.c
* synced with recent Ron's modifications in xHarbour
I'd like to ask Windows users to make tests with above
oleenum.prg and example sent by Luis
* harbour/source/rtl/gttrm/gttrm.c
* disable ACS mode before sending BEL on Linux compatibile terminals
- some of them may try to display chr(7) instead of generating
sound when ACSC is enabled
* harbour/source/vm/proc.c
+ added support for character parameter in PROCFILE() - now it can
accept <nLevel> | <sFuncSym> | <cFuncName> as first parameter
* harbour/source/vm/dynsym.c
* added support for detecting not cleanly overloaded by linker .prg
functions.
In such case hb_dynsymNew() checks if linker updated function
addresses and if yes then remove unnecessary HB_FS_LOCAL flag.
In such case works GCC (but not MinGW and DJGPP), OpwenWatcom
for Linux, DOS, Windows (and probably for OS2), POCC, XCC (with
/FORCE:MULTIPLE linker switch) and some other linkers I haven't
tested.
Otherwise (two different functions with the same name linked and
each accessible from different symbol, f.e. BCC32, MinGW, DJGPP)
it accept multiple HB_FS_LOCAL for dynamically loaded modules
(.hrb, .dll, .so, .dyn, ...) if HVM also accepted it (for future
KEEP_LOCAL_FUNC HB_LIBLOAD()/__HBRLOAD() parameter).
For statically linked modules it overloads one of the functions when
HB_OVERLOAD_MULTIPLE_FUNC macro is set (now by default to make tests
with different linkers). I left detail description in source code of
hb_dynsymNew() in source/vm/dynsym.c.
I hope it will also help Ron in recent xHarbour modifications - AFAIK
it's sth what he tires to do.
Anyhow please remember that that dirty overloading any symbols by
linker is very bad idea and in such case you have big chance that
wrong binaries will be created so the most preferable choice is
eliminating such situations and not using linker switches like
-Wl,--allow-multiple-definition or /FORCE:MULTIPLE
+ harbour/tests/multifnc
+ harbour/tests/multifnc/t0.prg
+ harbour/tests/multifnc/t1.prg
+ harbour/tests/multifnc/t2.prg
+ harbour/tests/multifnc/Makefile
+ added test code for results of dirty overloaded functions.
With recent modifications expected results are:
main t0.prg t0.prg
alert t1.prg t1.prg [ALERT]
p0 t0.prg t0.prg P0:t0.prg P0:t0.prg OK
p1 t0.prg t0.prg P1:t0.prg P1:t0.prg OK
p2 t1.prg t1.prg P2:t1.prg P2:t1.prg OK
p3 t0.prg t0.prg P3:t0.prg P3:t0.prg OK
p4 t1.prg t1.prg P4:t1.prg P4:t1.prg OK
p5 t2.prg t2.prg P5:t2.prg P5:t2.prg OK
===
main2 t1.prg t1.prg
alert t1.prg t1.prg [ALERT]
p0 t0.prg t0.prg P0:t0.prg P0:t0.prg OK
p1 t0.prg t0.prg P1:t0.prg P1:t0.prg OK
p2 t1.prg t1.prg P2:t1.prg P2:t1.prg OK
p3 t0.prg t0.prg P3:t0.prg P3:t0.prg OK
p4 t1.prg t1.prg P4:t1.prg P4:t1.prg OK
p5 t2.prg t2.prg P5:t2.prg P5:t2.prg OK
===
main3 t2.prg t2.prg
alert t1.prg t1.prg [ALERT]
p0 t0.prg t0.prg P0:t0.prg P0:t0.prg OK
p1 t0.prg t0.prg P1:t0.prg P1:t0.prg OK
p2 t1.prg t1.prg P2:t1.prg P2:t1.prg OK
p3 t0.prg t0.prg P3:t0.prg P3:t0.prg OK
p4 t1.prg t1.prg P4:t1.prg P4:t1.prg OK
p5 t2.prg t2.prg P5:t2.prg P5:t2.prg OK
I've tested only few compilers: GCC/G++ (Linux) MinGW (WINE-W32),
DJGPP (DOSEMU), OpenWatcom (Linux, WINE-W32, DOSEMU), XCC/POCC
(WINE-W32) and I'm interesting in results from other compiler/
platforms, f.e. from M[V]SC.
* harbour/include/hbexpra.c
+ added support for HB_ENUM*([@]<varname>) functions - disabled
by default can be enabled by HB_USE_ENUM_FUNCTIONS macro
* harbour/source/rtl/gttone.c
* use assembler code for tone emulation for POCC/XCC compiler only
for X86 platforms
* harbour/source/rtl/filesys.c
* do not include <share.h> for POCC/XCC
* harbour/source/compiler/gencli.c
* pacify warning
* harbour/config/w32/owatcom.cf
* harbour/config/w32/xcc.cf
* updated description in header files
+ harbour/config/w32/pocc.cf
+ added support for Pelles ISO C Compiler
* harbour/include/hbexpra.c
+ added support for HB_ENUM*([@]<varname>) functions - disabled
by default can be enabled by HB_USE_ENUM_FUNCTIONS macro
* harbour/source/rtl/gttone.c
* use assembler code for tone emulation for POCC/XCC compiler only
for X86 platforms
* harbour/source/rtl/filesys.c
* do not include <share.h> for POCC/XCC
* harbour/source/compiler/gencli.c
* pacify warning
* harbour/config/w32/owatcom.cf
* harbour/config/w32/xcc.cf
* updated description in header files
+ harbour/config/w32/pocc.cf
+ added support for Pelles ISO C Compiler
* contrib/tip/Makefile
* contrib/tip/makefile.bc
+ contrib/tip/makefile.vc
+ contrib/tip/make_vc.bat
* contrib/tip/tip.ch
* contrib/tip/utils.c
* contrib/tip/base64x.c
* contrib/tip/encmthd.c
- contrib/tip/hbhex2n.c
* contrib/tip/cgi.prg
* contrib/tip/client.prg
* contrib/tip/ftpcln.prg
* contrib/tip/httpcln.prg
* contrib/tip/mail.prg
* contrib/tip/thtml.prg
* contrib/tip/url.prg
+ Code converted to not require xhb lib.
% Now compiled with -kM switch to avoid macro expansion
of strings. This is important here, as "&" char is used
quite often in the code, so expect a somewhat better
performance.
- Removed hex number conversion functions, as compatible
versions are now available in Harbour with am hb_ prefix.
+ C code update to use Harbour API calls only.
+ Added VC build script.
! Fixed two C warnings.
! Standardized SVN header in one file.
! Set std SVN keywords and eol-style.
; Please test it.
* include/hbextern.ch
* source/rtl/hbinet.c
* contrib/xhb/xhb.ch
* contrib/xhb/xhbfunc.c
* Renamed hb_IsInetSocket() to hb_inetIsSocket() to
keep all inet related functions in one namespace.
* harbour/source/rtl/errorapi.c
+ added protection against possible GPF when some assign methods
were called without parameters
* harbour/source/rdd/workarea.c
* initialize uiFalgs also when DBS_FLAGS is not set
* harbour/contrib/bmdbfcdx/bmdbfcdx1.c
* fixed hb_cdxSkipFilter() declaration - it should be 'static' function
* harbour/source/pp/ppcore.c
* harbour/source/compiler/ppcomp.c
+ added support for changing all -k? switches by #pragma, f.e.;
#pragma -ks+
#pragma -kM-
#pragma -kx1
#pragma -kJ0
* harbour/source/compiler/hbusage.c
* changed -ks description
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* do not generate error message for negative indexes and
[] operators are used for simple types when -ks option
is used
* harbour/include/hbvmpub.h
* harbour/include/hbapi.h
* harbour/source/vm/hvm.c
* harbour/source/vm/extend.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
+ added HB_IT_DEFAULT flags - it allows to check if item was changed
* harbour/source/vm/memvars.c
* harbour/include/hbvm.h
! fixed HB_IT_MEMOFLAG updating to be Clipper compatible. Here we are
not Clipper compatible in one place: in clodeblock local parameters
with memo values are marked as MEMO but if you leave function where
codeblock were created then Clipper during detaching removes MEMO
flag. In Harbour memo flag is kept.
* harbour/include/hbvm.h
* harbour/source/vm/classes.c
* harbour/source/vm/hvm.c
% improved speed of extended references used for SETGET methods
and overloaded [] operators
* harbour/include/hbapi.h
* harbour/include/hbsetup.ch
* harbour/source/compiler/hbcomp.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* harbour/source/vm/cmdarg.c
* removed HB_COMPAT_XHB flags - only one HB_COMPAT_XHB still exist
in HVM in hashes.c - it will be removed soon.
* harbour/source/common/hbverdsp.c
* removed information about xHarbour compatibility mode - it's not
longer used. We are emulating xHarbour behavior using external
XHB library and standard compiler/HVM features
* harbour/contrib/xhb/xhb.ch
* harbour/contrib/xhb/xhbfunc.c
* harbour/source/vm/arrayshb.c
* moved XHB_AINS(), XHB_ADEL() from XHB lib to HVM as HB_AINS(), HB_ADEL()
* harbour/contrib/xhb/xhb.ch
+ added #pragma -ks+
+ added transaltion for hb_enumindex( <enumvar> )
+ harbour/contrib/xhb/xhbenum.c
+ added emulation for HB_EUMMINDEX()
* harbour/contrib/xhb/xhbfunc.c
* do not add INET*() function wrappers for DOS builds or when
HB_NO_DEFAULT_INET macro is set
* harbour/contrib/xhb/xhbmsgs.c
* added comment
* harbour/contrib/Makefile
+ added TIP and XHB
* harbour/make_rpm.sh
* harbour/harbour.spec
* removed HB_COMPAT_XHB, --with tip, --with xhb
they are not longer necessary
* contrib/bmdbfcdx/bmdbfcdx1.c
* contrib/bmdbfcdx/hbrddbmcdx.h
* synced with dbfcdx
* contrib/tip/make_b32.bat
* fixed copy of lib by Juan Galvez.
* contrib/xhb/makefile.bc
+ added missing files by Juan Galvez.
* source/rdd/dbfntx/dbfntx1.c
* source/rdd/dbfcdx/dbfcdx1.c
* source/rdd/dbf1.c
+ Added support for _SET_DEFEXTENSIONS to RDD.
(Przemek pls review it. I cannot send you direct mail, because
it bounces)
* harbour/source/rdd/dbf1.c
! fixed typo in hb_dbfGetRowVer() reported by Mindaugas, many
thanks for information, it was side effect of some experiments
I hadn't cleanly removed before commit.
* harbour/include/hbcomp.h
* pass compile time -ks state to RT macro compiler flags.
It means that if you compile some with which ¯os
then -ks compile time switch will be passed also to
macro compiler and respected later at runtime
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.y
+ added support for passing by reference array and object items
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* generate compile time error for @func(<vars,...>)
only @func() is acceptable
* include/Makefile
- include/hbcompat.ch
+ contrib/xhb/hbcompat.ch
* contrib/xhb/xhb.ch
* contrib/xhb/Makefile
* Moved content or hbcompat.ch into xhb.ch.
Those who need compatibility, have to replace
* Moved hbcompat.ch (for compatibility) to contrib/xhb
* harbour/include/hbexprb.c
* respect -ks in macrovars and array item references
* harbour/source/vm/memvars.c
* do not detach array items during detaching enumerator variable
also in standard (without HB_COMPAT_XHB) build
* harbour/include/hbapi.h
* harbour/source/vm/itemapi.c
* harbour/source/vm/garbage.c
+ added extended item references - it's universal reference which
can be used by HVM for many different things without introducing
new item types
* harbour/include/hbexprb.c
* respect -ks compiler also with <op>=, --, ++ operators
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
* harbour/source/vm/classes.c
+ added extended references for SETGET methods used as object
item references
* use extended references to respect overloaded [] operator in
object item references
+ added support for passing indexes to string item characters
( @cValue[n] ) by reference using extended references - extension
enabled by -ks compiler switch and //flags:s RT switch.
+ added hb_vmPushItemRef()
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/usrrdd/usrrdd.c
* use hb_vmPushItemRef()
* harbour/contrib/xhb/xhbcomp.prg
* harbour/contrib/xhb/xhbmsgs.c
* overload +, -, *, %, ^, ++, -- in string and numeric scalar
classes to emulated xHarbour behavior when 1 byte string is
used as numeric value.
Note: <nun> + <char1> in XHB lib gives numeric value when in
xHarbour character. But because <nun> <anyOtherOper> <char1>
in xHarbour gives numeric value then I guess that it's
xHarbour bug and I should not replicate it, f.e.:
proc main()
? 1+"A", 131-"A", 33 * 2, 132 / chr(2), 133 % "C"
return
* overload +, - in hash scalar class to emulated xHarbour behavior
for <hash> + <hash> and <hash> - <hash>
Seems that now we can remove HB_COMPAT_XHB flag from HVM and keep
Harbour compatibility only with -ks compile time switch and XHB
library. Please make some tests with Harbour compiled without
HB_COMPAT_XHB and xHarbour code using REQUEST XHB_LIB. It's possible
that I missed sth but some basic test shows that our emulation is
better then original and addresses places where xHarbour does not
work at all or gives strange results, f.e.:
#ifndef __XHARBOUR__
request XHB_LIB
#endif
proc main()
local h:={"ABC"=>123.45}
? h:abc
h:abc+=1000 ; ? h:abc
h["ABC"]+=1000; ? h:abc
p(@h:abc) ; ? h:abc
p(@h["ABC"]) ; ? h:abc
return
proc p(x)
x+=1000
return
or:
#ifndef __XHARBOUR__
request XHB_LIB
#endif
#include "hbclass.ch"
proc main()
local o:=myClass():new()
o:setget:="ABC"; ? o:setget
o:setget[2]:=42; ? o:setget
o:setget[2]+=42; ? o:setget
? o:setget[2]+=42; ? o:setget
?
o:var:="ABC"; ? o:var
o:var[2]:=42; ? o:var
o:var[2]+=42; ? o:var
? o:var[2]+=42; ? o:var
return
CREATE CLASS myClass
VAR var
METHOD setget SETGET
END CLASS
METHOD setget( xNewVal ) CLASS myClass
IF pcount() > 0
::var := xNewVal
ENDIF
RETURN ::var
* harbour/include/hbapirdd.h
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfdbt/dbfdbt1.c
* harbour/source/rdd/usrrdd/usrrdd.c
* harbour/contrib/rdd_ads/ads1.c
* changed second parameter in RELTEXT() method to PHB_ITEM
Now RELTEXT() works like FILTERTEXT() and the size of
expression is not limited. It's a modification I wanted
to make for a long time and I think that now is a good
moment to make it together with HB_FT_* modifications
- rmoved not longer necessary HARBOUR_MAX_RDD_RELTEXT_LENGTH
* harbour/source/rtl/gttrm/gttrm.c
* small cleanup
* harbour/include/dbinfo.ch
* harbour/contrib/rdd_ads/ads1.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/sdf1.c
+ added support for DBI_POSITIONED flag. Because some RDDs may not
support phantom record then checking for EOF() does not have to
be enough to detect that the cursor is positioned to phantom
record. Checking for RecNo() == LastRec() + 1 does not have to
work either because some RDD may use not use continuous record
numbers f.e. ADT. So in code like BROWSE() if you want to be sure
that current record is phantom one then (!dbInfo(DBI_POSITIONED))
should be used.
* harbour/include/hbclass.ch
+ added:
ON ERROR FUNCTION <FuncName>
OPERATOR <op> FUNCTION <FuncName> <scope>
* harbour/include/hbapicls.h
* harbour/source/vm/classes.c
* harbour/source/vm/hvm.c
+ added support for overloading right side $ operator
* harbour/contrib/xhb/xhbfunc.c
* rewritten xhb_ains() and xhb_adel() in C
* harbour/contrib/xhb/xhb.ch
* changed AINS() conversion to be xHarbour compatible
* harbour/contrib/xhb/Makefile
+ added xhb.ch to PRG_HEADERS so it's installed automatically
during 'make install'
* harbour/contrib/xhb/Makefile
+ harbour/contrib/xhb/xhbmsgs.c
* harbour/contrib/xhb/xhbcomp.prg
+ added support for $ operator used with hashes and arrays
on right side working _exactly_ like in xHarbour.
+ added support for negative indexes in used in [] operator
for array and strings.
Please remember that standard harbour build (without
HB_COMPAT_XHB flag) generate warning for negative indexes,
if you wan to pacify them then instead of var[-1] use var[(-1)]
+ added support for assign string characters with [] index.
Please remember that for standard harbour build (without
HB_COMPAT_XHB flag) you have to use -ks compile time switch
if you want to assign strings in such way because this feature
needs different PCODE, f.e. try to compile this code:
proc main()
local s:="ABC"
s[(-1)] := "*"
? s
return
with and without -ks switch
+ added support for accessing hash items using OO interface, f.e.:
proc main()
local h:={"ABC"=>123.45,"XYZ"=>567.89}
? h["ABC"], h["XYZ"]
? h:ABC, h:XYZ
h:ABC+=1000
h:XYZ:=-2000
? h:ABC, h:XYZ
return
All of the above extensions are written in C code so the speed
overhead is very small. Harbour evaluates PCODE faster then xHarbour
so in speed tests where above operators are executed in loop without
any other code the xHarbour results with native support are comparable
with Harbour ones where above operators are overloaded using scalar
classes so in normal code you should not find any difference with
one exception for assigning characters in very long strings.