Re:Coming from Dos using BC 3.1 to BC 5.02 or Builder
Quote
Clement Clarke wrote:
> I've got a program written in Borland C version 3.1 compiled for Dos.
> It has an input "Panel" command that sort of simulates an IBM Mainframe
> 3270 terminal.
> I'd like to convert it to run under Windows (not using Console mode -
> the real thing).
> Its a very big program, all in C, not C++.
I've been following the same migration path for the last year: switching
from long-esatblished- and large- programmes written in 3.1 (DOS).
Adding to my confusion was Borland's shift from BCB1 to 3 which, despite
its difficulties, was worth the transition.
The old rule applies: if you have to change more than 15% of the code,
you're better off to rewrite it. One word of advice, though:
(For some stupid reason, I can't think of the Windowing framework I was
using under DOS (memory lapse- long day) but the GUI had to be tightly
tied in to the operational code. This is no longer necessary in BCB
(though I'd imagine my code is more interrelated than most), so I'd
suggest thinking of your application as a synthesis of the two:
appearance and engine. Separate them off as best you can, and design
the GUI first. You will find it a lot easier than you expected (after
an initial learning curve, of course). Now you'd be able to port much
of your operational code inside the various event handlers you've
created in the GUI.
I'm not pretending it's simple, because it's not: but it's not as
difficult as you might think, and you'll doubtless improve your code
substantially along the way.
I've had different experiences with compile times. My 200 mHz Pro with
128M compiles with blinding speed: a complete rebuild takes about a
minute, while my 166 mHz Pentiums take at least that long to compile a
module. Speed and RAM makes it faster; when was it ever different? But
you'll take a lot longer writing the Windowing elements in 5, as well as
losing out on all the rich texture of Builder. The tradeoff is clear to
me. If your compile times are taking too long, work on a second machine
while its building- that's what I do!
Hope this is of some help...
Regards,
Michael Lockey