Re: [fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Jonas Maebe
Mattias Gaertner wrote: > I spotted several hidden gems via the list of FPC* macros. Note that a bunch of these are probably temporary ones, search for "Temporary" in compiler/options.pas for a list of those in your current FPC version. Those are removed from time to time as they are no longer req

Re: [fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Mattias Gaertner
On Wed, 15 Jun 2016 11:43:59 +0200 Mattias Gaertner wrote: >[...] > Thanks for the hint. Done. Oops. Wrong thread. To my rescue a hint: You can see the actual FPC defines in Lazarus by placing the cursor in the directive and pressing Ctrl+Space: {$IFDEF FPC|} I spotted several hidden gems via

Re: [fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Mattias Gaertner
On Wed, 15 Jun 2016 11:18:38 +0200 Sven Barth wrote: > Am 15.06.2016 10:15 schrieb "Juha Manninen" : > > > > Are there defines matching the modes in FPC, for example {$mode > delphiunicode} ? > > I want to do something like : > > {$IFDEF delphiunicode} > > ... > > {$ELSE} > > ... > >

Re: [fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Sven Barth
Am 15.06.2016 10:15 schrieb "Juha Manninen" : > > Are there defines matching the modes in FPC, for example {$mode delphiunicode} ? > I want to do something like : > {$IFDEF delphiunicode} > ... > {$ELSE} > ... > {$ENDIF} There are. They are FPC_, though DelphiUnicode seems to be miss

Re: [fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Juha Manninen
More accurately, I want to check {$ModeSwitch UnicodeStrings}. Anyway, if there is no define, I can use: {$IF SizeOf(Char) = 2} Works well although the highlighter in Lazarus editor shows it wrong. Juha ___ fpc-pascal maillist - fpc-pascal@lists.fr

[fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Juha Manninen
Are there defines matching the modes in FPC, for example {$mode delphiunicode} ? I want to do something like : {$IFDEF delphiunicode} ... {$ELSE} ... {$ENDIF} Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre