From 40cdceb92d2b197e3d551e4ed009e2c0a8ed6afa Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 14 Jan 2005 17:42:56 +0000 Subject: [PATCH] fixed invert assignment tool from Sergio git-svn-id: trunk@6593 - --- ide/invertassigntool.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ide/invertassigntool.pas b/ide/invertassigntool.pas index 10e1975fe6..5beed7dd86 100644 --- a/ide/invertassigntool.pas +++ b/ide/invertassigntool.pas @@ -46,7 +46,7 @@ function InvertAssignment(ALines:TStrings):TStrings; implementation -// This functiosn inverts all Assignment operation. +// This function inverts all Assignments operation. // like valuea := valueb; to valueb := valuea; function InvertAssignment(ALines:TStrings):TStrings; var iLeft, iSize : integer; //for identation purpose only @@ -70,7 +70,7 @@ var iLeft, iSize : integer; //for identation purpose only var i : integer; begin Result := ''; - for i := 0 to iChar do Result := Result+' '; + for i := 0 to iChar-1 do Result := Result+' '; end; var iPos: integer; @@ -101,7 +101,7 @@ var iLeft, iSize : integer; //for identation purpose only if Pos(':=',s) > 0 then begin if s_Comment <> '' then s_Comment := ' '+s_Comment; - + // Inverting iPos := Pos(':=', s ); s_Right := ClearLine( Copy(s,iPos+2, Length(s)-iPos) ); @@ -121,7 +121,7 @@ begin Result := TStringList.Create; - // Let's find the Bigest at Right Word for Identation + // Let's find the Bigest Words at Right for Identation iSize := 0; for i := 0 to ALines.Count-1 do begin