Harbour (programming language)

It is a modernised, open source and cross-platform version of the older Clipper system, which in turn developed from the dBase database market of the 1980s and 1990s.

Harbour code uses the same databases and can be compiled under a wide variety of platforms, including Microsoft Windows, Linux, Unix variants, several BSD descendants, Mac OS X, MINIX 3, Windows CE, Pocket PC, Symbian, iOS, Android, QNX, VxWorks, OS/2 (including eComStation and ArcaOS),[1] BeOS/Haiku, AIX and MS-DOS.

The idea of a free software Clipper compiler had been floating around for a long time and the subject has often cropped up in discussion on comp.lang.clipper.

Third-party RDDs, like RDDSQL, RDDSIX, RMDBFCDX, Advantage Database Server, and Mediator exemplify some of the RDD architecture features.

MySQL, PostgreSQL, SQLite, Firebird, Oracle are examples of databases which Harbour can connect to.

Under Microsoft Windows, Harbour is more stable but less well-documented than Clipper, but has multi-platform capability and is more transparent, allows for more customisation and can run from a USB flash drive.

Under Linux and Windows Mobile, Clipper source code can be compiled with Harbour with very little adaptation.

Most software originally written to run on Xbase++, FlagShip, FoxPro, xHarbour and others dialects can be compiled with Harbor with some adaptation.

Harbour can make use of multiple Graphical Terminal emulation, including console drivers, and Hybrid Console/GUIs, such as GTWvt, and GTWvg.

Harbour supports external GUI's, free (e.g. HBQt, HWGui, Mini-GUI (latest version based on Qt and QtContribs[3]) and commercial (e.g. FiveWin, Xailer).

Harbour is 100% Clipper-compatible[4] and supports many language syntax extensions including greatly extended run-time libraries such as OLE, Blat, OpenSSL, Free Image, GD, hbtip, hbtpathy, PCRE, hbmzip (zlib), hbbz2 (bzip2), cURL, Cairo, its own implementation of CA-Tools, updated NanFor libraries and many others.

Any xBase language provides a very productive way to build business and data intensive applications.

Harbour as every xBase language is case insensitive and can optionally accept keywords written just by their first four characters.

Arrays are ordered lists of scalars or complex types, indexed by number, starting at 1.

The basic control structures include all of the standard dBase, and Clipper control structures as well as additional ones inspired by the C or Java programming languages: In the FOR statement, the assignment expression is evaluated prior to the first loop iteration.

This means that a called procedure/function, may issue a BREAK statement, or a Break() expression, to force unfolding of any nested procedure/functions, all the way back to the first outer BEGIN SEQUENCE structure, either after its respective END statement, or a RECOVER clause if present.

Alternatively TRY [CATCH] [FINALLY] statements are available on xhb library working like the SEQUENCE construct.

Parameters passed to a procedure/function appear in the subroutine as local variables, and may accept any type, including references.

xHarbour takes a more aggressive approach to implementing new features in the language, while Harbour is more conservative in its approach, aiming first of all for an exact replication of Clipper behaviour and then implementing new features and extensions as a secondary consideration.

A detailed comparison between extensions implemented in Harbour and xHarbour can be found in the source repository of the project on GitHub.

Harbour code on HBIDE
HBIDE look.