[Lazarus] Regexp syntax
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Jun 15 10:00:13 CEST 2010
On 14/6/10 3:13, Peter E Williams wrote:
> Hi All,
>
> I really need to know what is the Dbase3/4 unit for Lazarus/Free Pascal
> and where is the sample project for manipulating them. I found it
> somewhere on the lazarus website but don't know where. I hope that it is
> okay for me to post some of my code which uses the XBase1 unit in Delphi
> 5 Enterprise which I am porting to my Hexxpawn8 game (which is cross
> platform open source).
>
> I use Dbase3/4+ files to store board patterns for my game which is sort
> of a cross between the pawns in Chess and checkers, using AI logic
> against the computer. (I chose Dbase format because it was the single
> most common database file format at the time.)
>
> What is the replacement unit for XBase1 for using Dbase3/4 files, and
> the functions/procedures etc to replace these calls to XBase1 ?
>
> How do I do the following:
>
> // declaring a Dbase file -- TXBase (what is the equivalent in Lazarus?)
> // I need to Get the Record # (HexxData.RecNo;)
<snip>
For a general introduction have a look at
http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial
For using Tdbf have a look at
http://wiki.lazarus.freepascal.org/Lazarus_Tdbf_Tutorial
Under Windows you would find the dbflaz.lpk package in
lazarus\components\tdbf\
There is an example application using Tdbf in lazarus\examples\addressbook\
You are best to avoid use of record numbers for locating records
altogether. Use the LocateRecord() method of Tdbf of one of its variants
instead.
Howard
More information about the Lazarus
mailing list