Pascal
This section describes the Pascal source modules for the Btrieve API.
The Btrieve API source modules for Pascal are described in the following subsections.
Source Modules
The Pascal interface is comprised of the following source modules:
BBTRAPID.PAS
BTRAPID.PAS contains the source code implementation of the Pascal application interface for DOS. This file provides support for applications calling Btrieve functions.
In order for Turbo Pascal to properly compile and link the Btrieve interface with the other modules in your application, you can compile BTRAPID.PAS to create a Turbo Pascal unit which you then list in the uses clause of your application’s source code.
BTRCONST.PAS
The file BTRCONST.PAS contains useful constants specific to Btrieve. These constants can help you standardize references to Btrieve operation codes, status codes, file specification flags, key specification flags, and many more items.
To use BTRCONST.PAS, you can compile it to create a Turbo Pascal unit which you then list in the uses clause of your application’s source code.
You can use the Pascal application interface without taking advantage of BTRCONST.PAS; however, using the file may simplify your programming effort.
BTRSAMPD.PAS
The source file BTRSAMPD.PAS is a sample Btrieve programs that you can compile, link, and run.
Programming Notes
Calling a Btrieve function always returns an INTEGER value that corresponds to a status code. After a Btrieve call, your application should always check the value of this status code. A Status Code of 0 indicates a successful operation. Your application must be able to recognize and resolve a non-zero status.
Although you must provide all parameters on every call, the MicroKernel does not use every parameter for every operation. See the Btrieve API Guide for a more detailed description of the parameters that are relevant for each operation.
*Note: If your application uses Pascal record structures that contain variant strings, consider that odd-length elements in a Pascal record may require an extra byte of storage (even if the record is not packed). This is an important consideration when you define the record length for the Create (14) operation. See your Pascal reference manual for more information on record types.