bug fix: function ReadFileToEnd and Utils

Signed-off-by: Slav76 <GavrikVA@gmail.com>
This commit is contained in:
Slav76 2015-10-08 20:42:13 +10:00
parent e7f5e71b80
commit ace91cf03a
6 changed files with 11 additions and 8 deletions

View file

@ -19,7 +19,7 @@ begin
while not eof(f) do
begin
readln(f,s);
sb.append(s);
sb.AppendLine(s);
end;
ReadFileToEnd:=sb.ToString();
CloseFile(f);{}

View file

@ -17,7 +17,7 @@ begin
while not eof(f) do
begin
readln(f,s);
sb.append(s);
sb.AppendLine(s);
end;
ReadFileToEnd:=sb.ToString();
CloseFile(f);{}

View file

@ -21,11 +21,14 @@ begin
while not eof(f) do begin
readln(f,s);
i := s.IndexOf('=');
name := s.Substring(0,i);
if name = IncrementDef then
defs.Add(name, System.Convert.ToInt32(s.Substring(i+1))+IncrementValue)
else
defs.Add(name, s.Substring(i+1));
if i > 0 then
begin
name := s.Substring(0,i);
if name = IncrementDef then
defs.Add(name, System.Convert.ToInt32(s.Substring(i+1))+IncrementValue)
else
defs.Add(name, s.Substring(i+1));
end;
end;
CloseFile(f);
AssignFile(f, DefsFile);

View file

@ -19,7 +19,7 @@ begin
while not eof(f) do
begin
readln(f,s);
sb.append(s);
sb.AppendLine(s);
end;
ReadFileToEnd:=sb.ToString();
CloseFile(f);{}