Harbour (programming language): Difference between revisions

Content deleted Content added
Some typos
Line 9:
== Design ==
 
Unlike Java which is intended to be write once, run anywhere, Harbour's aimaims to be '''write once, compile anywhere'''. As the same compiler is available for all of the above operating systems, there is no need for recoding to produce identical products for different platforms, except when operating- system- dependent features are used. Cross-compiling is supported with MiniGW32.
Under Microsoft Windows Harbour is more stable but less well-documented than Clipper, but has multi-platform capability and is more transparent, customizable and can run from a USB flash drive.
Under Linux and WindowWindows Mobile , Clipper source code can be compiled with Harbour with avery little adaptation.
 
Harbour can use Cthe compiler Borlandfollowing C++, Microsoft Visual C++ (6compilers, 7,among 8), MinGW, Watcom C.others:
Borland C++
Harbour offering multiple GT (Graphic Terminals), including console drivers, and Hybrid Console/GUIs, such as GTWvt, and GTWvg.
Microsoft Visual C++ (6, 7, 8)
MinGW
Watcom C
 
Harbour offeringcan multiplemake GTuse of multiple (Graphic Terminals)Terminal emulations, including console drivers, and Hybrid Console/GUIs, such as GTWvt, and GTWvg.
Harbour supportsupports external GUIs, both (free such as(e.g. HWGui, MiniGUI) and commercial, such as(e.g. FiveWin, Xailer ), .
Harbour is 100% Clipper backward compatible and supports many language syntax extensions, greatly extended run-time libraries such as OLE, ODBC, MySQL, PostgreSQL, TIpt, TXml, RegEx, HbZip, xbScript and extensive third party support.
Harbour is 100% Clipper-compatible and supports many language syntax extensions, greatly extended run-time libraries such as OLE, ODBC, MySQL, PostgreSQL, TIpt, TXml, RegEx, HbZip, xbScript and extensive third party support.

Harbour extends the Clipper Replaceable Database Drivers (RDD) approach. It offers multiple RDDs such as DBF, DBFNTX, DBFCDX, DBFDBT and DBFFPT. In Harbour multiple RDDs can be used in a single application, and new logical RDDs can be defined from combination of other RDDRDDs. The RDD architecture allows for inheritance, so that a given RDD may extend the functionality of other existing RDD(s). 3rd party RDDs, like RDDSQL, RDDSIX, RMDBFCDX, Advantage Database Server, and Mediator exemplify some of the RDD architecture features.
 
Harbour also offers ODBC support beby means of an OOP syntax, and ADO support by means of OLE.
Macro Operator (runtime compiler)
 
One of the most powerful features of the xBase languages is the MACRO Operator '&'. Harbour's implementation of the Macro Operator allows for runtime compilation of any valid Harbour expression. Such compiled expression may be used as a VALUE, i.e. the right side of an Assignment, but more interestingly, such compiled expression may be used to resolve the LEFT side of an assignment, i.e. PRIVATE, or PUBLIC variables, or database FIELD.
'''Macro Operator (runtime compiler)'''
Additionally the Macro Operator may compile and execute function calls, complete assignments, or even list of arguments, and the result of the macro may be used to resolve any of the above contexts in the compiled application. IOW, any Harbour application may be extended, and/or modified in runtime, to compile and execute additional code on demand.
 
One of the most powerful features of the xBase languages is the MACRO Operator '&'. Harbour's implementation of the Macro Operator allows for runtime compilation of any valid Harbour expression. Such a compiled expression may be used as a VALUE, i.e. the right side of an Assignmentassignment, but more interestingly, such a compiled expression may be used to resolve the LEFT side of an assignment, i.e. PRIVATE, or PUBLIC variables, or a database FIELD.
 
Additionally the Macro Operator may compile and execute function calls, complete assignments, or even list of arguments, and the result of the macro may be used to resolve any of the above contexts in the compiled application. IOWIn other words, any Harbour application may be extended, and/or modified inat runtime, to compile and execute additional code on demand.
 
'''Object Oriented Programming'''
 
Object Oriented Programming. Programming in an OOP style is a broader issue than a specific library or a specific interface. But OOP programming is something many Clipper programmers have come to expect. CA-Clipper 5.2 and especially 5.3 added a number of base classes, and a matching OOP syntax. Libraries such as CLASSy, Fivewin, Clip4Win, and TopClass provide additional OOP functionality.
 
Harbour has OOP extensions with full support for classes including inheritance, based on CLASSy syntax. OOP syntax in Harbour is very similar to that of earlier Clipper class libraries so it should be possible to maintain legacy Clipper code with minimal changes.
Object Oriented Programming. Programming in an OOP style is a broader issue than a specific library or a specific interface. But OOP programming is something many Clipper programmers have come to expect. CA-Clipper 5.2 and especially 5.3 added a number of base classes, and a matching OOP syntax. Libraries such as CLASSy, Fivewin, Clip4Win, and TopClass provide
Harbour have OOP extensions with full inheritance and class declaration. Based on Classy syntax, Harbour follows suit in providing a full collection of commands for declaration of classes, inheritance, and so on. The syntax may not wind up being identical with that in the tool you previously used, but it should be possible to maintain your old Clipper class hierarchy with minimal changes to source code.
 
==Xharbour comparison==