Delphi i Linux

0

Witam.
Ostatnio grzebałem w demkach Indy i znalazłem coś takiego:
{$IFDEF Linux}
procedure TMainForm.DirectoryListBoxDrawItem(Sender: TObject; Index: Integer;
Rect: TRect; State: TOwnerDrawState; var Handled: Boolean);
{$ELSE}
procedure TMainForm.DirectoryListBoxDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
{$ENDIF}

Czy to znaczy, że jeżeli ktoś posiada Linuxa to ruszy mu ten program?

0

IFDEF Structure

Take special note of the IFDEF structure. The form is:

{$IFDEF Win32}

Win32 Code

{$ENDIF}

{$IFDEF CLR}

.NET Code

{$ENDIF}

While this may not appear special, consider the more common form:

{$IFDEF Win32}

Win32 Code

{$ELSE}

.NET Code

{$ENDIF}

The first form is preferred and superior to the second more common form. The first form is more easily expanded and does not imply default behaviour for new platforms. The first one is easily expanded for a third condition, while the second one is not. When expanded for three conditions the first form simply becomes:

{$IFDEF Win32}

Win32 Code

{$ENDIF}

{$IFDEF CLR}

.NET Code

{$ENDIF}

{$IFDEF Linux}

Linux Code

{$ENDIF}

Because it did not define an implicit "else" behaviour, it can be easily expanded for three, four, or as many conditions as needed.

Więcej na:
http://bdn1.borland.com/borcon2004/article/paper/0,1963,32158,00.html :)

0

Nie, to się odnosi do kompilacji pod środowiskiem Kylix.

0

rozumiem. dzięki za odpowiedzi.

0

A to że do Kylix to normalne. Toż odpowiednik Delphi pod Linussem. :-)

0

wiem co to kylix, ale podobno do bani ;p
na razie mialem okazje bawic sie tylko w lazarusie

1 użytkowników online, w tym zalogowanych: 0, gości: 1