Recent

Author Topic: Differences between {$MODE Delphi} and {$mode objfpc}{$H+}  (Read 5589 times)

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Differences between {$MODE Delphi} and {$mode objfpc}{$H+}
« on: June 12, 2017, 10:41:28 pm »
Hi all,

I would like to document the differences between {$MODE Delphi} and {$mode objfpc}{$H+}
but not only as on https://www.freepascal.org/docs-html/prog/progap4.html#progse62.html
because there's several issues that are more complex to solve
when moving an old DELPHI project to Lazarus' LCL.

Is there a WIKI page or HELP page to write things like that ?
usually using latest Lazarus release version with Windows 10

Handoko

  • Hero Member
  • *****
  • Posts: 5158
  • My goal: build my own game engine using Lazarus
Re: Differences between {$MODE Delphi} and {$mode objfpc}{$H+}
« Reply #1 on: June 13, 2017, 04:25:06 am »
This page has explanation about the differences:
http://wiki.freepascal.org/Code_Conversion_Guide#Syntax_differences

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Differences between {$MODE Delphi} and {$mode objfpc}{$H+}
« Reply #2 on: June 13, 2017, 08:30:08 am »
{$MODE Delphi} and {$mode objfpc}{$H+}
What the {$H+} doing there? {$MODE DELPHI} can be in mode {$H-}.... So that's not a difference at all.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Differences between {$MODE Delphi} and {$mode objfpc}{$H+}
« Reply #3 on: June 13, 2017, 11:32:36 am »
This page has explanation about the differences:
http://wiki.freepascal.org/Code_Conversion_Guide#Syntax_differences

Thanks a lot for this link, I didn't know it exists !

I'm working on converting a large project (I didn't write it ..)
which does not jet run well under Lazarus.
So I have to achieve that the project compiles under both Lazarus and Delphi 5.

The page does not show how to write for both compilers ..
I will add some explanations there ..
« Last Edit: June 17, 2017, 05:08:29 pm by PeterX »
usually using latest Lazarus release version with Windows 10

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Differences between {$MODE Delphi} and {$mode objfpc}{$H+}
« Reply #4 on: June 13, 2017, 11:39:58 am »
What the {$H+} doing there? {$MODE DELPHI} can be in mode {$H-}....

Looks to me like {$H+} is default, when creating a new UNIT for object pascal.
But You're right, no question.
usually using latest Lazarus release version with Windows 10

 

TinyPortal © 2005-2018