On 24 Mar 97 Mike Copeland said to Bart Broersma...
MC> I've been programming in TP/BP for 12-13 years, having >700,000 lines
MC> of applications, but I can't seem to "switch the paradigm" or find the
MC> magic wand which will get me started in converting _any_ of my Pascal
MC> programs to Delphi.
You have to divide your old programs into two parts, the user interface, and
the part that crunches the numbers etc. The TP code that crunches the
numbers should work fine in Delphi, subject to a little fine tuning to
handle a few changed function names (and, if you use Delphi 2, the
prostitution of Pascal to handle "C"-style strings).
The user interface, on the other hand, you just have to throw away and start
over. The nice part is that your users will love the new interface.
In one of my programs, the main "algorithmic" part has a few bits such as
{$IFDEF DELPHI}
s := FileSearch('A.A','') ;
{$ELSE}
s := FSearch('A.A','') ;
{$ENDIF}
scattered in the few places where codes changes are needed. By adding
or removing a {$DEFINE DELPHI} line, it can be combined with either the DOS
or the Delphi user interface to generate DOS or Delphi executables. That
way, I don't have to worry about the two programs algorithms getting "out of
synch."
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)
|