Clipper Tutorial: a Guide to Open Source Clipper(s)

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Quite a lot of people were interested in the previous versions of this page, when it was the most visited page in my old website and so, in addition to my personal interest that keeps me delving into the subject, I wish to complete it. The interest in this topic is confirmed by the fact that another Wikibook was created on a very similar theme: Application_Development_with_Harbour, started on September 15, 2010 by the user Raumi75 - on his page he states laconically this intention: «I like the Harbour programming language and hope we can create the missing manual». Unfortunately, the project didn't take off.

This page disappeared when GeoCities was closed (in fact it still contains some broken links to GeoCities pages), and it has been reloaded thanks to some requests I got, for example on Facebook. There you can find the "Harbour MiniGUI" group and many others.

As a newbie to Wikibooks, I did not yet properly format the few sources on this page (Wikibooks has syntax highlighting for Clipper, but it is a bit buggy). If you check it, you will see misplaced links and so... this page definitely needs proofreading!

I'd like to see this tutorial grow! If someone from newsgroups like comp.lang.clipper or mailing lists like HarbourUsers (http://lists.harbour-project.org/mailman/listinfo/harbourusers) or Facebook groups like ‎Harbour Project would give me help or clues, or contribute, it would be great. To apologize for its incompleteness, I can only say that this page contains everything I know about Clipper and xBase programming (in a given moment... I always try to learn new things...). I let digressions sneak in here and there, and also my sense of humor. This book not written in the serious style of all the other Wikibooks I've seen.

I tried to adhere to the classical tutorials' bottom-up approach of showing all the basic functions via very simple examples. The plan to include some bigger examples, with the top-down approach (how do I deal with this problem?) is suggested, but not yet pursued...

At the moment this guide deals mostly with (x)Harbour under Windows, although I plan to describe other environments.

I have decided to name this tutorial "a Guide to Open Source Clipper(s)" and not "a Guide to Open Source xBase" because I like the name Clipper, and as you can see by watching at the open source compilers I discuss (Clip and (x)Harbour) the influence of the name Clipper is great: only the old X2c and now this new thing called X# don't recall the name Clipper. I now consider the name inadequate. Maybe something like Programming With Harbour and Other Free xBase Languages?

Modern xBase open source/free dialects/implementations are:

  1. Harbour (https://harbour.github.io/)
  2. xHarbour (http://www.xharbour.org/)
    which are the most active and mature projects. The second is a fork of the first.
  3. Clip, which apparently exists in two versions on SourceForge: https://sourceforge.net/projects/x-clip/ (v 1.2.1.6, Last Update: 2017-06-04) and https://sourceforge.net/projects/clip-itk/
  4. X#, which is an implementation for .NET (https://www.xsharp.info/, https://github.com/X-Sharp/XSharpPublic). It looks interesting but the runtime is missing. The documentation is at https://www.xsharp.info/help/index.html.
  5. DBFree (http://www.dbfree.org) is used to create web applications and is open source, even if it contains components, such the fundamental component - the xBase interpreter MaxScript (http://maxscript.org/, http://www.maxsis.it) is not: it's just freeware.
X2c (http://web.archive.org/web/20090416070816/http://x2c.dtop.com/, http://freshmeat.sourceforge.net/projects/x2c) is very old - what use can it have for a modern programmer if the download links don't work and the only freely available C compiler can be found at the website Embarcadero Antique Software, namely https://cc.embarcadero.com/item/25636? However, I like some of its examples and I'll mention them.

This Guide was born as a set of notes when I followed a small project (I was asked about the possibility of porting an old Summer 87 program to Windows - and I did it by simply recompiling the source code to check Harbour's compatibility with Clipper, and creating a small Windows program, which showed a simple splash screen and an interface where the menu entries pointed to stubs). The experience was encouraging, although the Windows version of that application was never actually realized. Its by-product, my notes, evolved. Their first objective was to redo the examples of a "PC GUIDE", the first of eight booklets of a self-instruction course in the Clipper language bought on an Italian newsstand in 1993.

I noticed also that there were no good tutorials and that the books about dBase/Clipper/xBase/Visual Objects and so on couldn't be found in any bookstore (and only with great difficulty in libraries!).

Some old versions of these notes can be found on GeoCities mirrors - (I'd like to thank W. Birula for letting me know, not to mention his suggestion of uploading my set of notes on Wikibook, and also for the flowchart he kindly provided). Thanks to bpd2000 for the interesting link he provided.

When (and if) finished, it will prove a complete guide to Open Source Clipper programming. However, this set of notes is still very incomplete.

The current plan consists of two introductory chapters, then the first part of the tutorial will cover the basic of the language, up to the procedural programming facilities and the native database-DBF file support. Part 3 will explain OOP and other programming topics, and the last part will be about programming a user interface and web applications. This could even make up for a nice introduction to computer science!

I like to receive feedback, comments, and (why not?) contributions, as almost everything you will read here is my effort (to say so). I will include contact information to reach me.

Michele Povigna
email: povigna@virgilio.it
Skype: michele.povigna
  1. Part 1: Introduction
  2. Part 2: The Common Ground
  3. Part 3: Additions to the Language
  4. Part 4: Real Applications