Harbour Differences

Differences between Harbour and other compatible compilers ( xHarbour, Clipper, xBase++, CLIP, FlagShip )


Compile time support for merging multiple .prg modules
New language statements
Extended codeblocks
Hash arrays
References to variables stored in arrays
Passing array and hash items by reference
Passing object variables by reference
Detached locals and references
Declaration and initialization of variables
Functions with variable number of parameters
Hb_ArrayToParams() function
Macros with declared symbols
Macro messages
Multivalue macros
Using [] operator for string items
Negative indexes in [] operator used to access items from tail
Using one character length string as numeric value
New bit operators
IN, HAS, LIKE operators
Pre/post incrementation/decrementation and <op>= operators
Global / global external (global_extern)
Literal date and TIMESTAMP values
Extended literal string in compiler and macrocompiler
Symbol items and function references
OOP scopes
OOP and multiinheritance
OOP and private/hidden datas
OOP and class object/class messages
Typed object variables
Object destructors
Scalar classes
Runtime class modification
Array and string preallocation
DIVERT statement
Multi window GTs and runtime GT switching
Multi thread support
Thread local work areas and concurrent work area access
Harbour tasks and MT support in DOS
Background task
Codeblock serialization / deserialization
Native RDDs
Regular expressions
INET sockets
I18N (internationalization) support
ZLIB (compression/decompression)
Serial port support
Macro compiler
Compiler library
PP library
Contrib libraries
C level compatibility
Performance and resource usage

This list borrowed from Harbour github documentation; please look at there for details.



An explanation about HMG …

An explanation about Harbour, HMG and HMG-IDE

By Sri  Rathinagiri » Mon Sep 08, 2014 12:44 pm

Clipper programmers sometimes find it difficult to accommodate with HMG. The reason is the difference between TUI (Text User Interface) and GUI. In GUI, the program control is in the hands of the user and it is event driven. User can click on anything (say minimize button, maximize button, even another program running behind or any controls). So, it is our duty to design the whole window and wait for user’s action and write procedures for each and every action of the user.

GUI offers many innovative controls like Grid, Combobox, Button, Spinner etc., as against only textbox in TUI. So, we have to eventually accommodate events for all these controls.

Now, coming to HMG as not only a GUI library but a bundle of all. Even though HMG is directly based on the latest Harbour versions, HMG comes as a bundle. You need not install any other software to build a windows application. Full stop. 🙂 It contains the GUI library, PRG compiler, C Compiler and all the supporting software products to successfully build an application.

People (at least me) sometimes misunderstand GUI and OOP as one and the same. GUI and OOP are different and independent to each other. GUI can be made to work with or without OOP and vice versa. HMG is based on Win32 API system. Win32 API system works on handles and hooks. Every window/control in HMG is provided with a handle (like the file handle in clipper) and events are hooked on that particular handle. Once any hooked event is fired by the user (say a click of a button) immediately Win32 API searches for a CallBack function which is provided by the developer via HMG. The beauty of HMG would be, the developer is made free from handling all these internal affairs, handles, hooks and callback procedures. Instead he can concentrate on what is to be done if the event is fired.

You will be astonished to see how a ‘define window’ statement in HMG invokes 100s of lines of Harbour and C code. Please see the source folder of HMG if you want to know in detail.

Again, the advantage of HMG is, you need not include any dlls with your executable code as it is based on Win32 API. The application would run in XP to Windows version 8 (even in Windows 97 some cases).

Now coming to your questions.

1) How to get a lot of of source codes containing of samples to handle screen-menus ; from basic up to complex/advanced screen-menus?

To answer this questions, pls help us by showing links which permit us to download. And by sharing your source-code available for public.

Screenshoot attached herein, is a sample screen handle we need to implement on our application, ASAP. Being programmers for long time, we need any advanced skill in order to satisfy our users/clients currently still using our DOS-apps-versions.

You can start with Your HMG Directory\SAMPLES\Basics\TUTORIAL folder. It contains various tutorials for basic programmers. Then you can see basic and controls sub-folders of samples. I don’t think that any advanced skill set is required to satisfy our existing DOS clients. Actually ther will be happy to update their programs to Windows version as it is user friendly and more flexible.

2) How to avoid one app/EXE is double-run by users in the same computer?

This problem never arise under DOS who own a single window. I noticed when exercising HMG-ID (executing IDE.EXE) to build project, the RUN (F5) function fails to detect the problem. that’s way HMG-IDE made run-time error as if the mistake came from source program.

Yes, it is a valid point. In HMG-IDE previous version there was an error marking ‘Is the program still running?’. I don’t know what happened to that in the recent versions. I will request Claudio to look into this. Thanks for reporting.

3) Why stable version release from official Harbour-Project differ from this forum?

The project says the latest stable version is 3.0.0. while this forum says HMG 3.3.1. Any clarification in this matter is urgently needed to avoid confusion.

Because they are entirely different projects. As I have discussed earlier, HMG is based on Harbour. But it is a bundle by itself. Some major implementations have been made after the versions HMG 3.0. Introducing Unicode in 3.1. Made it to a stable version in 3.2. And the latest and significant achievement is HMG in 64 Bits, which made it to 3.3 series.

HMG Extended is also developed and released parallelly and they have their own version numbering system.

IMHO, we can use the latest stable versions for the development.

4) Pls help us describe what the differences between this 3 services you’ve been provided: Harbour Compiler, Harbour Mini GIU, Harbour-IDE. We need to know exactly when and why use them?

Harbour compiler is the core. Habour MiniGUI is the Win32 wrapper library to access the GUI aspects of the programs. HMG IDE is a tool to develop and build our software in Harbour MiniGUI.

You can use simply Harbour if you need only console mode. If you want GUI support, you can use Harbour MiniGUI and its build.bat ( even without using HMG IDE at all).

If you need Forms Designer and an easy build system, you can use HMG IDE which can co-ordinate your forms, database, resources (icons, pictures etc) and linking other third party libraries.

Sri Rathinagiri
Sivakasi, India


Courtesy of author, this article borrowed from here.

Contributed articles

Contributed articles on Harbour &   HMG

(  In order  of  publishing  date  )

Roberto Lopez  (Builder of HMG and HMG-IDE; Buenos Aires, Argentina )

What is HMG ?

Sri Rathinagiri (Builder and  Administrator of HMG Forum;  Sivakasi, India)

How I have joined HMG Family – A Story
An explanation about Harbour, HMG and HMG-IDE

Raumi  ( Senior member of HMG-Forum; Lünen, Germany )

From CA-Clipper to Windows in 5 Minutes
Postgresql as a backend for HMG

Danny Del Pilar ( Senior member of HMG-Forum; Manila, Philippines )

My HMG Learning Experience

Agil Abdullah Batati  (Programmer Never Surrender; Jakarta / Indonesia  )

The Easy Way To Study Programming In Harbour And HMG —  Part I

Harbour ReadMe

Id: 1stread.txt 18716 2012-12-03 13:52:22Z vszakats

Harbour Web Site

Harbour is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; see the file COPYING.txt. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (or visit the web site ).

As a special exception, the Harbour Project gives permission for additional uses of the text contained in its release of Harbour.

The exception is that, if you link the Harbour libraries with other files to produce an executable, this does not by itself cause the resulting executable to be covered by the GNU General Public License. Your use of that executable is in no way restricted on account of linking the Harbour library code into it.

This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.

This exception applies only to the code released by the Harbour Project under the name Harbour. If you copy code from other Harbour Project or Free Software Foundation releases into a copy of Harbour, as the General Public License permits, the exception does not apply to the code that you add in this way. To avoid misleading anyone as to the status of such modified files, you must delete this exception notice from them.

If you write modifications of your own for Harbour, it is your choice whether to permit this exception to apply to your modifications. If you do not wish that, delete this exception notice.

Template : Document

Name : 1st document to read

Category : Document

Subcategory: General Info

Oneliner : A starters guide to Harbour

Description :

Welcome to Harbour


Clipper is a trademark of Computer Associates and will often be referred to as CA-Cl*pper within Harbour documents. Regardless of this variant, Clipper is recognized as Computer Associates’ trademark.

Harbour is a free software compiler for the xBase superset language often referred to as Clipper (the language that is implemented by the compiler Clipper). The goal of the Harbour project is to produce a cross platform CA-Cl*pper compatible compiler.

The Harbour web site is at : http://harbour-project.org. If you have any problems with this copy of Harbour please visit our web site and ensure that you are using the latest release.

If you have any questions about Harbour please be sure to read the FAQ. Also, please be sure to read the documentation that comes with Harbour, you should find it in the same directory in which you found this file.

If you are reading this file as part of a source distribution of harbour you probably want to start by reading dirstruc.txt because this is your map to the harbour source directories.

Harbour is a superset of Clipper and is backwards compatible with nearly 100% of all Clipper 5.2x or 5.3 code. Most Clipper S’87 code will also compile and run fine, but may require some modifications to run well.

Platforms : All

Files :\doc\en\1stread.txt

Superlib Read Me

This is the final released version of SuperLib.

It includes a library for Clipper 5.2d, complete source code,  Norton Guides, examples and an .RMK file.

The author no longer does any Clipper work of any kind, and hopes to stop recieving calls and e-mail from people wanting to purchase  Superlib.

This file may be redistributed to FTPs or other archives as long as this README.TXT file is included. Files included:

README.TXT : This file
LIB52.ZIP : Clipper 5.2 compiled .LIB file
SOURCE.ZIP : All the source code
SAMPLES.ZIP : Source and data files for all of the example programs
NG.ZIP : Norton Guides help file
SUP52.RMK : Rmake file for 5.2. You will almost certainly need to modify it

This product is now free, but still copyrighted by Garry A Prefontaine.

You may not charge for any part of this software.

You may use it without charge as long as you:





SuperLib is provided on an “AS IS” basis, with no implied warranty regarding merchantability or fitness for any particular purpose. Functional Software Inc. and the author Garry A Prefontaine, make no representations or warranties with respect to the contents hereof, and specifically disclaim any implied warranties. By using this software you agree that Functional Software Inc. and the author Garry A Prefontaine, will not be liable to you or any third party for any use of (or inability to use) this software, or for any damages (direct or indirect) whatsoever, even Functional Software Inc or the author Garry A Prefontaine, are apprised of the possibility of such damages occurring. In no event shall Functional Software Inc or the author Garry A Prefontaine be liable for any loss of profit or any other commercial damage, including but not limited to special,
incidental, consequential or other damages. The entire risk related to the quality and performance of the program is on you.

What is Superlib ?

Superlib Description by Oasis 

The final version of SuperLib, and now it’s FREEWARE, and it comes with 100% SOURCE CODE and extensive norton guide.

SuperLib is a library of functions for Clipper 5.x.

What makes SuperLib different than other libraries on the marketplace is that is contains a large collection of METAFUNCTIONS. A metafunction is like a pre-packaged mini application, ready to link and run. For instance, SuperLib’s report writer is as simple to use as:


All of the metafunctions are menu-driven and ready to use without modifications. All SuperLib functions are data independant. All that is required is an open DBF file. SuperLib will determine the field structure and use the current DBF. SuperLib requires no special setup or way of doing things. It works with you, not against you. SuperLib functions will do their best to save/restore all settings as they found them. (such as colors, cursor, screens, etc.)

There are over 300 functions in SuperLib, ranging from the metafunctions down to the granular common component functions such as events and popups. (see the function list below, or the .NG file). This version of SuperLib is 100% mouse aware! All SuperLib functions
are automatically aware of the mouse and respond to the mouse.

SuperLib even contains replacements for Clipper’s READ, MENU TO, ACHOICE and MEMOEDIT functions that are mouse aware. Several functions are provided to help you build mouse awareness into your own functions.

SuperLib is Blinker 3.x, 4.x and Exospace compatible for protected mode programs. SuperLib is 99.9 % pure Clipper code, and uses no Clipper internals, which makes for painless upgrading to future versions of Clipper and the various linkers.

SuperLib is network ready, with all locking already built in. (works fine for single-user too)

There is no registration of SuperLib, since it is now freeware. The author, Gary Prefontaine, is no longer supporting the product. If you need help with this library, please ask on comp.lang.clipper

Thanks, Gary.



SP Changing SuperLib

 If you wish to change the source code to certain
 SUPER.Lib modules and replace them in the SUPER.LIB file,
 you will need access to a library manager.

 The most popular and accessible is LIB.EXE, from
 Microsoft, which comes with many Microsoft compilers.
 You will need version 3.11 or above of LIB.EXE.

 To update the library, do the following:

   1. Change and test the .PRG, .C  or .ASM module.

      for Clipper (PRG) modules, I use:

          CLIPPER <file>  -n  -w

      for  C  (C) modules, I use:  (MSC 5.0)

          CL /c  /AL  /Zl  /Oalt /FPa  /Gs  /Fo<file>.obj <file>.c

      for Assembly (ASM) modules, I use: (MASM 5.10)

          MASM   <file>;

   2. After testing, use the following to replace the module in
      the library with the new .OBJ file:

            LIB SUP??? -+<objectfilename> ;


            LIB SUP???  -+<objectfilename1>+<objectfilename2>;

 The semicolon is important.

 Further documentation will be found in the LIB.EXE
 reference manual.