Autor Beitrag
sabi_14
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Mo 07.07.08 14:43 
Hallo zusammen,
ich möchte gerne einen Boolean-Wert in einen String umwandeln, um
ihn nachher auszugeben.
Ich verwende Delphi 5 und dort funktioniert 'BoolToStr' nicht.
Weiss jemand, wie dass sonst geht?

Danke schonmal im Vorraus.

Grüsse
Sabi


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mo 07.07.2008 um 14:54
nagel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 708

Win7, Ubuntu 10.10

BeitragVerfasst: Mo 07.07.08 14:47 
Schreib dir die Funktion einfach, ca. so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
Function BoolToStr(B: Boolean): String;
Begin
If B Then Result := 'True' Else Result := 'False';
End;
alex517
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 60


D7Ent, FB, FIBPlus
BeitragVerfasst: Mo 07.07.08 14:48 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
const
  cBoolStr: Array[Boolean] of String = ('Nein''Ja');
..

  x := false;
  s := cBoolStr[x];

alex