Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-17 Thread ulrich
Dne 15.7.2015 v 10:16 Michael Van Canneyt napsal(a): On Tue, 14 Jul 2015, ulrich wrote: Hi, I have this unit, but when I compile it, I get this error: Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas. The unit name must always match the file name. This is logical,

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-17 Thread ulrich
Dne 15.7.2015 v 11:47 Pierre Free Pascal napsal(a): {$IFDEF FPC} {$MACRO ON} {$IFNDEF XXX_} {$DEFINE XXX_:=DFM_RR} // replace prefix {$ENDIF} {$ENDIF} {$INFO compiled with XXX_} unit XXX_parser; {$mode objfpc}{$H+} interface implementation end. Macros are only expanded on

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, Sven Barth wrote: Am 17.07.2015 08:12 schrieb ulrich rom...@cbox.cz: Dne 15.7.2015 v 10:16 Michael Van Canneyt napsal(a): On Tue, 14 Jul 2015, ulrich wrote: Hi, I have this unit, but when I compile it, I get this error: Illegal unit name XXX_Parser. The unit

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-17 Thread Sven Barth
Am 17.07.2015 08:12 schrieb ulrich rom...@cbox.cz: Dne 15.7.2015 v 10:16 Michael Van Canneyt napsal(a): On Tue, 14 Jul 2015, ulrich wrote: Hi, I have this unit, but when I compile it, I get this error: Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas. The unit

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-15 Thread Michael Van Canneyt
On Tue, 14 Jul 2015, ulrich wrote: Hi, I have this unit, but when I compile it, I get this error: Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas. The unit name must always match the file name. This is logical, because otherwise the compiler can never find it if a

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-15 Thread Pierre Free Pascal
{$IFDEF FPC} {$MACRO ON} {$IFNDEF XXX_} {$DEFINE XXX_:=DFM_RR} // replace prefix {$ENDIF} {$ENDIF} {$INFO compiled with XXX_} unit XXX_parser; {$mode objfpc}{$H+} interface implementation end. Macros are only expanded on whole tokens (aka words). So

Re: [fpc-pascal] will be work macro with name of the unit?

2015-07-15 Thread Sven Barth
Am 15.07.2015 08:21 schrieb ulrich rom...@cbox.cz: Hi, I have this unit, but when I compile it, I get this error: Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas. Second question: Why not displayed $INFO directive in the message window (I have enabled -vi switch in

[fpc-pascal] will be work macro with name of the unit?

2015-07-15 Thread ulrich
Hi, I have this unit, but when I compile it, I get this error: Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas. Second question: Why not displayed $INFO directive in the message window (I have enabled -vi switch in command line)? {$IFDEF FPC} {$MACRO ON}