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

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 and a full manual in English is still missing. In Portuguese, however, I recently discovered a large and detailed 800-pages manual, Introdução a Programação com Harbour by Vlademiro Landim Júnior (you can find the second edition at https://sagierp.com.br/devel/aulas/Harbour2ed.pdf).

This page disappeared when GeoCities was closed (but it should not contain any longer 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.

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.

Unrelated:

  1. 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.

Discontinued: Clip, which apparently exists in two versions on SourceForge:

  1. https://sourceforge.net/projects/x-clip/ (v 1.2.1.6, Last Update: 2017-06-04) and
  2. https://sourceforge.net/projects/clip-itk/

No longer to be found on the Net:

  1. 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.
  2. 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. More info: http://www.edm2.com/index.php/X2C

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 at 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. An I would like to thank also Lisa, Pieter and Claude.

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'd 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. It may take me a long time to reply, but I always do (my actual negative record is a delay of 204 days...)

Michele Povigna
email: povigna@virgilio.it
Skype: michele.povigna