Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.313 Beiträge
Delphi 12 Athens
|
Re: Prozent ausrechnen und Wert zuweisen
21. Nov 2003, 10:14
Delphi-Quellcode:
Function Status(Wert: Byte): String;
Var I: Integer;
Begin
If Wert >= 100 Then
Result := '[AA] - ( 100% - COMPLETE ) - [AA]'
Else Begin
Result := '[';
For I := 1 to 10 - (Wert div 10) do
Result := Result + '#';
While I <= 10 do Begin
Inc(I); {I := I + 1;}
Result := Result + '-';
End;
Result := Result + '] - ' + IntToStr(Wert) + '% Complete - [AA]';
End;
End;
Delphi-Quellcode:
Uses StrUtils;
Function Status(Wert: Byte): String;
Begin
If Wert >= 100 Then
Result := '[AA] - ( 100% - COMPLETE ) - [AA]'
Else
Result := '[' + DupeString('#', 10 - (Wert div 10)) + DupeString('-', Wert div 10) +
'] - ' + IntToStr(Wert) + '% Complete - [AA]';
End;
Ein Therapeut entspricht 1024 Gigapeut.
|