function CreateDatabase(filename :string; cnt, mt :integer): integer;

CreateDatabase creates a new dbf file according added fields. It returns non-zero value if success.
The accepts parameters: a name of a new file, a number of fields, a type of a memo fields. It releases the allocated memory.

var ok :integer; begin if NewDatabase then begin AddField('Name', 'C', 20); AddField('Birth', 'D', 0); AddField('Sex', 'L', 0); AddField('Salary', 'N', 10 + 2*256); AddField('Notes', 'M', 0); end; ok := CreateDatabase('clients.dbf', 5, 0); writeln( inttostr( ok ) ); end.