[fpc-devel] {$I %LINE%} and friends

2011-04-28 Thread Joerg Schuelke
There is one problem with {$I %LINE%} and his friends, which restricts the use of these directives. They are expanded even inside a macro immediately, so, if you define a macro for debugging purposes, you get the line and file info for the place of the definition and not for the place of the expans

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread michael . vancanneyt
On Fri, 29 Apr 2011, Joerg Schuelke wrote: There is one problem with {$I %LINE%} and his friends, which restricts the use of these directives. They are expanded even inside a macro immediately, so, if you define a macro for debugging purposes, you get the line and file info for the place of th

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread Hans-Peter Diettrich
michael.vancann...@wisa.be schrieb: But what is the cleaner way? To defer the expansion of {$I %xxx%} inside macros, or to define c-like macros __LINE__ and __FILE__, maybe with nicer names? Defer expansion. The use of {$I } is mandatory, since __LINE__ and friends are valid pascal identifie

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread michael . vancanneyt
On Fri, 29 Apr 2011, Hans-Peter Diettrich wrote: michael.vancann...@wisa.be schrieb: But what is the cleaner way? To defer the expansion of {$I %xxx%} inside macros, or to define c-like macros __LINE__ and __FILE__, maybe with nicer names? Defer expansion. The use of {$I } is mandatory, si

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread Marco van de Voort
In our previous episode, Hans-Peter Diettrich said: > I wonder why FPC broke Delphi compatibility by adding {$MODE}, instead > of choosing its own prefix for added compiler directives and macros. FPC might not have been that Delphi compatible when this was introduced. IIRC mode FPC is the oldes

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread Daniƫl Mantione
Op Fri, 29 Apr 2011, schreef michael.vancann...@wisa.be: I wonder why FPC broke Delphi compatibility by adding {$MODE}, instead of choosing its own prefix for added compiler directives and macros. Because it would mean yet another kind of directive, this is confusing. My take on it is that

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread Marco van de Voort
In our previous episode, Dani?l Mantione said: > >> I wonder why FPC broke Delphi compatibility by adding {$MODE}, instead of > >> choosing its own prefix for added compiler directives and macros. > > > > Because it would mean yet another kind of directive, this is confusing. > > My take on it is

Re: [fpc-devel] {$I %LINE%} and friends

2011-04-29 Thread Florian Klaempfl
Am 29.04.2011 10:59, schrieb Hans-Peter Diettrich: michael.vancann...@wisa.be schrieb: But what is the cleaner way? To defer the expansion of {$I %xxx%} inside macros, or to define c-like macros __LINE__ and __FILE__, maybe with nicer names? Defer expansion. The use of {$I } is mandatory, sin