[lazarus] circular unit reference

Marc Weustink marc at dommelstein.net
Sat Nov 15 09:18:39 EST 2003


At 14:37 15-11-2003, Florian Klaempfl wrote:
>rstar at mnet-online.de wrote:
>>The current thread shows that there a always problems with
>>includes, paths, circular refereces etc.
>
>The problem is simply that the fpc 1.9.x win32 rtl comes with a messages 
>unit which wasn't the case in 1.0.x.
>
>>One of these guidelines might be helpful:
>>- Don't use includes (all in one file); example: CLX from Borland
>
>Really :)? I just imaginge the FPC system unit with ~20 supported targets 
>having 100k lines ...
>
>
>>- Use #ifdef "target" for platform specific things
>
>No. Too much $ifdefs are always a sign for a bad design.

For those who wonder... this is why ifdefs make things unreadable

-  if FOnCompare=AValue then exit;
+  if {$IFDEF FPC}{$ELSE}@{$ENDIF}FOnCompare={$IFDEF 
FPC}{$ELSE}@{$ENDIF}AValue then exit;


Marc 






More information about the Lazarus mailing list