![]() |
SC-Tool: Zur Quelltextformatierung
Hi,
ich habe mir ein kleines Tool geschrieben, welches den Quelltext automatisch formatiert. Ich habe die Formatierungsart sehr an meinen Stil angepaßt und hoffe dass es Fehlerfrei funktioniert. Die Quelltextinformationen (wie oft procedure, function vorkommt, wieviel Zeichen das Projekt hat, ...) sind sehr langsam, bei langen Texten! Ein Formatierungsbeispiel:
Delphi-Quellcode:
zu
procedure Execute (test: String);
var e, f : Integer; TempList : TStringList; begin TempList := TStringList.Create; TempList.Clear; For e := 0 to 10 Do if e < 0 then TempList.Add ('test'); For e := 0 to 10 Do if e < 0 then TempList.Add ('test'); For e := 0 to 10 Do begin if e < 0 then begin TempList.Add ('test'); end else begin TempList.Add ('test'); end; if e <0 then f := 4 else f:=5; end; end;
Delphi-Quellcode:
procedure Execute (test: String);
var e, f : Integer; TempList : TStringList; begin TempList := TStringList.Create; TempList.Clear; For e := 0 to 10 Do if e < 0 then TempList.Add ('test'); For e := 0 to 10 Do if e < 0 then TempList.Add ('test'); For e := 0 to 10 Do begin if e < 0 then begin TempList.Add ('test'); end else begin TempList.Add ('test'); end; if e <0 then f := 4 else f:=5; end; end; Download (ca. 300 kb): ![]() Grüße, KM [edit=alcaeus]Delphi- statt Code-Tags verwendet. Mfg, alcaeus[/edit] |
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:58 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz