Re: Line too long ???
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: Mon, 15 Oct 2007 14:55:17 -0700
On 12 Oct, 18:22, "Stark" <franco.jo...@xxxxxx> wrote:
This time I copied everything to the Notepad, made my chages there and
saved as a .txt file. The I renamed it .pas and Delphi was happy and it
compiled ok. I still need to understand what I should do to prevent this
thing..
Its difficult to prevent when you're adding strings from another
source with different linebreak standards. Perhaps you should write a
small app to select a file with a TOpenDialog and which passes the
filepthname to a procedure like ...
procedure CorrectLineBreaks(FPN : string);
var
SL : TStringList;
Str : string;
begin
SL := TStringList.Create;
try
SL.LoadFromFile(FPN);
Str := SL.Text;
AdjustLineBreaks(Str);
SL.Text := Str;
SL.SaveToFile(FPN);
finally
SL.Free;
end;
end;
AdjustLineBreaks() and loading/saving to a stringlist should sort it
out for you.
Alan Lloyd
.
- Follow-Ups:
- Re: Line too long ???
- From: Stark
- Re: Line too long ???
- From: Hans-Peter Diettrich
- Re: Line too long ???
- References:
- Line too long ???
- From: Stark
- Re: Line too long ???
- From: Rudy Velthuis
- Re: Line too long ???
- From: Stark
- Re: Line too long ???
- From: Rudy Velthuis
- Re: Line too long ???
- From: Stark
- Re: Line too long ???
- From: Rudy Velthuis
- Re: Line too long ???
- From: Stark
- Line too long ???
- Prev by Date: Re: D5 - Class\Collection example??
- Next by Date: Re: Component for reading DNG files
- Previous by thread: Re: Line too long ???
- Next by thread: Re: Line too long ???
- Index(es):
Relevant Pages
|