Clipper (programming language)

ImprimirCitar

Clipper is a procedural and imperative programming language created in 1985 by the Nantucket Corporation and later sold to Computer Associates, which marketed it as CA-Clipper. Clipper was originally created as a compiler for the interpreter manager system. of dBase III databases (in fact Nantucket's seasonal releases included a tag indicating so), but over time the product evolved and matured, becoming a more powerful compiled language than the original, not only because of its own implementations but also because of extensions developed by third parties in C, Assembly and Pascal, from which it gradually inherited features. This made it the leading tool for development of relational database applications under the MS-DOS operating system, especially management, accounting and billing programs, commercial agendas and testimonial programs.

Features

Unlike other xBase languages, Clipper never had an interpreter mode, similar to dBase's. Its database management utilities, such as the creation of tables (DBU), were delivered with the source code written in Clipper and included, the user could adapt them to his needs if he wanted. It also provided many routines written in C and Assembler that the user could call upon, even extending and creating entire pre-link libraries.

Clipper works in pure compiler mode generating binary object code; the package also provided a linker (RTLINK or DLINK, and BLINKER) that with the object module and prelink libraries generated a direct executable module. The latter gave Clipper applications a speed that other database managers did not have, and, as a disadvantage, the need to recompile and link again every time an error in the source code was corrected (debugging was slow).

It has features that were very attractive for its time and its work environment (DOS), such as: own management of virtual memory (RAM on disk); extended memory management, applications could overcome the barrier of 640Kb of RAM imposed by MS-DOS; routines and libraries can be loaded only when needed and unloaded from RAM when no longer needed (dynamic linking and overlays); the number of records per table was only limited to the capacity of the disk (with a maximum of 1024 columns); great robustness in the applications, particularly in those designed for client-server (LAN network), etc.

Although it had practically no calculation functions such as trigonometric functions, which other languages like FoxPro did incorporate; the user could easily write them in C and use them like any other function in the package's own library, an advantage that came from the fact that the Clipper compiler and many of its libraries were almost entirely written in C.

Its form, administration, storage and exchange of screens was simple, effective and fast; which gave good dynamism to the applications developed with Clipper.

The language itself was powerful, with a large number of statements, functions, memory management and variables that allowed the programmer very flexible and efficient development; reasonably quickly. Also included in the package was a complete "browsable online manual", which was loaded into RAM, at the request of the programmer, and accessed by pressing a couple of keys.

In its long golden age it was probably the "small and medium-size" most used in the world. Even today there are many Clipper developers (some grouped together with communities and forums on the Internet), who write applications, even Windows-style, using their own graphical libraries written in C and Assembler.

The first versions

Early versions are called seasonal versions because they refer to a season of the year in their official names. All of them were named as dBase compilers. These were:

  • Nantucket Clipper Winter'84 - launched on 25 May 1985
  • Nantucket Clipper Summer'85 - released in 1985
  • Nantucket Clipper Winter'85 - launched on January 29, 1986
  • Nantucket Clipper Autumn'86 - released on October 31, 1986
  • Nantucket Clipper Summer'87 - released on December 21, 1987
  • Gatsoft Clipper Summer'88 - released on March 16, 1988

Clipper 5

Clipper 5.0 marks a qualitative leap in the language, although it starts badly. Given the growing popularity (Summer 87 has been used until the year 2000 as a regular development tool; in Telefónica it was widely used until at least 2008 in important applications[citation required]), it is decided to focus more on extending the language than on being an improved compiler of dBase. This is how pseudo-objects and other improvements are implemented... but the product is released with numerous software bugs that cause the target audience to retract and continue using the much more stable Summer87 version. 5.01 fixes many of the issues, but it won't be until 5.2 that the massive dump from the developers will take place.

Nantucket versions 5 are:

  • Nantucket Clipper 5.00 - launched in 1990
  • Nantucket Clipper 5.01 - launched on 15 April 1991
  • Nantucket Clipper 5.01 Rev.129 - launched on 31 March 1992

The American multinational Computer Associates acquires Nantucket and launches to improve the product by strengthening the characteristics inherited from C, in particular the code-block data type (literally code block, a hybrid between dBase macros, string evaluation, and function pointers). Another improvement coming from version 5.0 is the "Replaceable Database Drivers" (RDD or Replaceable Database Drivers), which allow you to switch between different database standards with a single statement. The appearance of version 5.2, with a frantic race of subversions (with improvements and bug fixes) until 5.2c, which marks the beginning of the mass migration of those who still remained in Summer' 87. It thus becomes the most used version of Clipper in history. On the contrary, its successor, 5.3, despite implementing improvements, falls into a major error, by not taking into account compatibility with at least the most popular Clipper libraries (both commercial and freeware), and by consuming excessive DOS resources.

  • CA Clipper 5.01a -
  • CA Clipper 5.20 - launched on 15 February 1993
  • CA-Clipper 5.2a - launched on 15 March 1993
  • CA Clipper 5.2b - launched on 25 June 1993
  • CA-Clipper 5.2c - launched on 6 August 1993
  • CA Clipper 5.2d - launched on 25 March 1994
  • CA-Clipper 5.2e - launched on 7 February 1995
  • CA Clipper 5.30 - released on 26 June 1995
  • CA Clipper 5.3a - launched on 20 May 1996
  • CA Clipper 5.3b - launched on 20 May 1997

Computer Associates decides to abandon Clipper in the face of the rise of Microsoft Windows, and turns some of Clipper's development (the Nantucket Aspen project) into its new CA-Visual Objects tool, which is released almost every month. the same time as Clipper 5.3 But the abandonment of the xBase syntax and the failure to provide an adequate migration tool, together with the high price of the product (which also had to compete with other products from the house itself, one of them based on BASIC), makes that the bulk of Clipper programmers choose to stay on versions 5.2/5.3 with third-party libraries like FiveWin, and DGE, or migrate to xBase tools like Visual FoxPro as the DOS market shrinks.

On April 22, 2002 Computer Associates and GrafX Software announce that they have reached a licensing, marketing, and development agreement for two of their development languages: CA-Clipper and CA-Visual Objects.

One of the main features that helped make Clipper successful was the ability to expand the language with C routines and assembler. Several of them, such as CodeBase or Apollo are RDDs. With the advent of Windows, several of them were developed to port Clipper applications to Windows. The most popular is the Spanish FiveWin, used in the leading accounting products in Spain.

In addition, the use of alternative linkers allowed to improve the performance of the generated executable. The most acclaimed was Blinker, which adds a DOS extender with protected mode (it is used with numerous languages and compilers). Added support for compiling programs and libraries for Windows.

The Clipper language is currently being actively implemented and extended by various projects and vendors. Among the free software projects we can highlight Clip (outdated since 2006), Harbor and xHarbour. Between the commercial compilers XBase++ and Visual FlagShip. And Other products like "MEDIATOR" and "Eagle1 and Condor1 Archived 2009-07-09 at the Wayback Machine." that give you the ability to connect to relational database servers like MS-SQL, MySQL, and Oracle.

XBase++ has been called the 32-bit Clipper Compiler, and is currently the leader in innovations and language additions. More than 25,000 copies of the compiler have already been sold and are used by everyone from solo developers to large companies like Hewlett-Packard and the Canadian government.

Several of these implementations are portable thanks to their development in C (DOS, Windows, GNU/Linux (32 and 64 bits), Unix (32 and 64 bits), and Mac OS X), supporting several language extensions [ one]; They have several language extensions, and several Replaceable Database Drivers (RDD) that support the most popular table formats, such as DBF, DBTNTX, DBFCDX (FoxPro and Comix), MachSix (Apollo), SQL, and more. All of these new implementations maintain full compatibility with the standard xBase syntax, while offering object-oriented programming and target-oriented syntax such as SQLExecute().

Currently there is a free version, the Harbor Project which originally aims to be 100% compatible with version 5.2 (The most popular version of Clipper), new features have also been added such as support for SQL via SQLite. Harbor is available for multiple platforms, including not only MS-DOS and Windows, but also GNU/Linux, OS/2, and others. In July 2011, the launch of version 3.0 was officially announced, which was the last one published and it is discounted that the project has been abandoned.

In 2005, the Clipper-related Usenet newsgroups comp.lang.clipper and comp.lang.clipper.visual-objects were still active.

Programming in Clipper

A simple Hello World:

 ? "Hello World"

A simple database input mask:

 USE Customer SHARED NEW cls @ 1, 0 SAY "ClitNum" TEAP Customer- 2005CliNum PICT "9999999" VALID Customer- 2005CliNum  0 @ 3, 0 SAY "Contact" TEAP Customer- 2005Contact VALID !(Customer- 2005Contact) @ 4, 0 SAY "Guide" TEAP Customer- 2005Direction READ

Function that reverses a string (Clipper 5.2):

CLEARACCEPT "Locate a chain to invest it: " TO cText

? cText
? "inverted is, "InvStr(cText)
//
FUNCTION invStr(_cText)
 LOCAL aText1, cNew, n, cTemp, g, x
 aText1 = ARRAY (LEN (_cText)
 cNews = " FOR #1 TO LEN(_cText)
 cTemp = LEFT(_cText, n)
 aText1[ n ] = RIGHT(cTemp, 1)
 NEXT n
 x = 1
 FOR g = LEN(_cText) TO 1 STEP -1
 cNews = aText1[ x ] + cNew
 x = x + 1
 NEXT g
RETURN cNews

Contenido relacionado

Category:Wiki

PHP nuke

PHP-Nuke is an automated web-based news and content management system based on PHP and MySQL technologies. Originally PHP-Nuke was a fork made by the...

DirectX

DirectX is a collection of APIs developed to facilitate complex tasks related to multimedia, especially video and game programming, on the Microsoft Windows...
Más resultados...
Tamaño del texto:
Copiar