BB> I am trying to port an old DOS app, a tiny custom-made database-like
BB> program, to the Windows (3.1x) environment. Since I'm used to
BB> programmingin TP, I wanted to do this in Delphi (1.0).
BB> There are some problems however.
BB> 1. The (external) datastructure my old program uses (typed file of
BB> somekind of records) must not be altered, because I must be able to
BB> use the old
BB> DOS program as well (on an old AT) as the Windows version, both using
You can easily work with Typed files in Delphi. Since you know the file
format, you can used the pascal routines to work with typed files, load them
into an array as you mentioned and then have a routine that populates all the
boxes on the screen when you select an elment of the array. If need more
detail, there is an entire chapter for this in my book (Teach Yourself Delphi
2 in 21 Days) that will work fine in Delphi 1. If you every port it to Delphi
2, you may need to deal with variable sizes since Delphi 2
has variables that take more space then the 16 versions. You may run into
this with Delphi 1 and your old DOS files, so you should keep then in mind
when reading the records in.
Hope this helps.
Steve
--- FreeMail 1.07b
(1:203/21)
---------------
* Origin: The Visual Programmer's Workshop - N.H., Ca (916)338-3230 *
|