Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-03

Choose compiler mode

12 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

aradeonas

Hi,

After times I used Lazarus I still have a question about compiler mode. Why there is 5 mode?What can I do when I want objfpc mode benefits that is Lazarus default but for example I want advanced record syntax that can used with Delphi mode?
Can any one explain it to me or link me to a source?

Regards,
Ara

http://www.fastmail.com - IMAP accessible web-mail

Reply by email

Felipe Monteiro de Carvalho
to aradeonas
aradeonas wrote
What can I do when I want objfpc mode benefits that is Lazarus default but for example I want advanced record syntax that can used with Delphi mode?

Split your unit in 2: one in objfpc mode and another in delphi mode.

Felipe Monteiro de Carvalho

Reply by email

leledumbo
to aradeonas: After times I used Lazarus I still have a question about compiler mode. Why there is 5…

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: Split your unit in 2: one in objfpc mode and another in delphi mode. Felipe Monteiro de…
Show quoted text 6 lines
On Wed, Mar 11, 2015 at 9:02 AM, aradeonas wrote: > What can I do when I want objfpc mode benefits that > is Lazarus default but for example I want advanced record syntax that > can used with Delphi mode? Split your unit in 2: one in objfpc mode and another in delphi mode.

Or use {$ModeSwitch advancedrecords}.

Mattias

Reply by email

aradeonas
to Mattias Gaertner

ModeSwitch is interesting.
But why they aren't in one mode?I mean all the good stuff in one mode?

Regards,
Ara

Mattias Gaertner wrote 20 lines
On Wed, 11 Mar 2015 10:20:54 +0100 Felipe Monteiro de Carvalho wrote: > On Wed, Mar 11, 2015 at 9:02 AM, aradeonas wrote: > > What can I do when I want objfpc mode benefits that > > is Lazarus default but for example I want advanced record syntax that > > can used with Delphi mode? > > Split your unit in 2: one in objfpc mode and another in delphi mode. Or use {$ModeSwitch advancedrecords}. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
http://www.fastmail.com - Does exactly what it says on the tin

Reply by email

Michael Van Canneyt
to aradeonas
aradeonas wrote
ModeSwitch is interesting. But why they aren't in one mode?I mean all the good stuff in one mode?

What is 'good stuff' ? That depends on the person.

Also: you may want to control compatibility. If we added stuff that we think is fun, someone uses it in e.g. delphi mode without realizing Delphi doesn't support it, and suddenly his code no longer compiles in Delphi...

Michael.

Reply by email

aradeonas
to aradeonas: ModeSwitch is interesting. But why they aren't in one mode?I mean all the good stuff in…

Like advancedrecords,
For many developers like me that Lazarus is going to be his/her main IDE and dont care code compatible with Delphi these are boring. For example Im using Delphi for 10 years and from the time Im using Lazarus I never need comparability.
I mean while Lazarus and FPC are going to be bigger its good to have a mode with all good stuff (again like advancedrecords in one place). But what I know! Im new here.

Regards,
Ara

aradeonas wrote 37 lines
ModeSwitch is interesting. But why they aren't in one mode?I mean all the good stuff in one mode? Regards, Ara On Wed, Mar 11, 2015, at 02:35 AM, Mattias Gaertner wrote: > On Wed, 11 Mar 2015 10:20:54 +0100 > Felipe Monteiro de Carvalho wrote: > > > On Wed, Mar 11, 2015 at 9:02 AM, aradeonas wrote: > > > What can I do when I want objfpc mode benefits that > > > is Lazarus default but for example I want advanced record syntax that > > > can used with Delphi mode? > > > > Split your unit in 2: one in objfpc mode and another in delphi mode. > > Or use {$ModeSwitch advancedrecords}. > > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- http://www.fastmail.com - Does exactly what it says on the tin -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
http://www.fastmail.com - Faster than the air-speed velocity of an unladen european swallow

Reply by email

leledumbo
to aradeonas: ModeSwitch is interesting. But why they aren't in one mode?I mean all the good stuff in…
But why they aren't in one mode?I mean all the good stuff in one mode?

Because some of them are intersecting:
- Generics syntax in ObjFPC and Delphi mode are different
- Integer = SmallInt in TP/FPC mode, but LongInt in ObjFPC/Delphi mode

continue the list yourself by reading the docs

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Choose-compiler-mode-tp4041075p4041094.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

aradeonas
to leledumbo

Ok,Thank you.

Ara

leledumbo wrote 20 lines
> But why they aren't in one mode?I mean all the good stuff in one mode? Because some of them are intersecting: - Generics syntax in ObjFPC and Delphi mode are different - Integer = SmallInt in TP/FPC mode, but LongInt in ObjFPC/Delphi mode continue the list yourself by reading the docs -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Choose-compiler-mode-tp4041075p4041094.html Sent from the Free Pascal - Lazarus mailing list . -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
http://www.fastmail.com - Faster than the air-speed velocity of an unladen european swallow

Reply by email

Marco van de Voort
to Michael Van Canneyt: What is 'good stuff' ? That depends on the person. Also: you may want to control…
Michael Van Canneyt wrote 8 lines
> ModeSwitch is interesting. > But why they aren't in one mode?I mean all the good stuff in one mode? What is 'good stuff' ? That depends on the person. Also: you may want to control compatibility. If we added stuff that we think is fun, someone uses it in e.g. delphi mode without realizing Delphi doesn't support it, and suddenly his code no longer compiles in Delphi...

Mode Delphi doesn't even try to enforce delphi compatibility, so IMHO that is a stretch.

I would welcome a setting to generate $mode delphi units by default.

Reply by email

Michael Van Canneyt
to Marco van de Voort
Marco van de Voort wrote 12 lines
On Wed, Mar 11, 2015 at 10:55:07AM +0100, Michael Van Canneyt wrote: >> ModeSwitch is interesting. >> But why they aren't in one mode?I mean all the good stuff in one mode? > > What is 'good stuff' ? That depends on the person. > > Also: you may want to control compatibility. If we added stuff that we think is fun, > someone uses it in e.g. delphi mode without realizing Delphi doesn't support it, > and suddenly his code no longer compiles in Delphi... Mode Delphi doesn't even try to enforce delphi compatibility, so IMHO that is a stretch.

Please elaborate ?

Michael.

Reply by email