Board index » delphi » Porting TPW 1.5 to Delphi
Nick Widboom
![]() Delphi Developer |
Sat, 22 Apr 2000 03:00:00 GMT
|
Nick Widboom
![]() Delphi Developer |
Sat, 22 Apr 2000 03:00:00 GMT
Porting TPW 1.5 to DelphiDoes anyone know if code in Turbo Pascal for WIndows 1.5 can be |
Robert Le
![]() Delphi Developer |
Sat, 22 Apr 2000 03:00:00 GMT
Re:Porting TPW 1.5 to DelphiQuoteNick Widboom wrote: in your program. All your OWL stuff is essentially toast, which isn't the worst thing since you get to use all the goodies in Delphi. If you have some sort of non OWL engine or kernal it can be converted very little effort, mostly due to inheriting from (TPW) TObject and TCollection. (I created TOldObject and TOldCollection and inherited from them.) In the long run you'll probably want to move "object" to "class" since the object is now obsolete. This too isn't too painful and really only requires do some minor restructuring (mostly init->create, done->destroy, using "inherited" instead of "TAncestor." and dropping the pointer references) Moving your engine/kernal to Delphi (32 bit) can result in a substantial As I understand it version 3 of Delphi doesn't even mention the old Bob Lee |
Art Leganchu
![]() Delphi Developer |
Sun, 23 Apr 2000 03:00:00 GMT
Re:Porting TPW 1.5 to DelphiI ported about 80,000 lines of Pascal 6 (DOS) code to delphi 1 There are a few issues: 1. Pointer arithmetic... the segment-offset format for DOS and D1 are 2. Time stamps... If you saved time stamps in the old Borland format, 3. Stuff like color constants, the way pens and fonts were defined etc.. ( I had some graph stuff to convert, too) but I dont know how much an 4. Inlines. No more inline functions. Most of the inline I had was ============================================================ I evtually got it to D2, but If you GO to delphi 2 or 3, 1. Record alignment... if you are saving record structures in files, 2. Strings. D2 default for type "String", is the new pascal "huge" However, certain functions that used to take "string" as a parameter, 3. Overflow. I had a 3rd-party sort routine that depended on 4. Pointer Arithmetic again... flat 32 bit address now makes it easy. 5. Memavail, maxavail no longer there. 6. If you used "word"-typed arguments to Pascal functions, where So-- there ARE issues, but it should be do-able. QuoteNick Widboom wrote: |