AccessMyLibrary provides FREE access to over 30 million articles from top publications available through your library.
Create a link to this page
Copy and paste this link tag into your Web page or blog:
Clipper 5.0's Extend System lets you add C and assembly functions to your applications. it works by providing a common method of passing parameters between different programming environments.
To get the full power from Clipper, you should understand how its Extend System operates.
The Extend system is a group of functions and macros that provide you with a method of passing information to external functions-written in Microsoft C or assembler-for processing, or to provide complementary methods for returning the information to Clipper programs. These routines provide a common method of passing parameters between dissimilar programming environments.
Extend System elements include runtime data structures, interface functions, service functions, header files and definitions, and, most importantly, the Extend Protocol. To give you an overview of the entire Extend System, I'll cover each of them briefly below.
Think of the method Extend uses as a collection of post office boxes, set in a wall with Clipper on one side and C (or assembler) on the other. Clipper data, or a pointer to the data, is stored in particular boxes, based on type, on the Clipper side of the wall-but control is passed to the C or assembler function. By using the functions supplied with Extend, external C functions can get to the data, process it, and return it to a mailbox for Clipper. Depending on the function, it can be the same mailbox or a different one. Once this is done, the C function returns control to Clipper.
The set of routines for passing parameters to C functions are usually referred to as the -par functions. Since Clipper and C data types aren't directly interchangeable, these functions provide both conversion and "transportation." Here's the correlation between data types:
Clipper c Extend
Data type Data type function
character char* _parc()
_parcien()
date char _pards()
logical int _pari()
numeric int _parni()
long _parni()
double _parnd()