Re: Line too long ???



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

.



Relevant Pages

  • Re: ISAM error when trying to create tablelink
    ... Dim tDef As DAO.TableDef ... Doug Steele, Microsoft Access MVP ... Dim str As String ...
    (microsoft.public.access.modulesdaovba)
  • Re: Using the Dictionary object
    ... Private Sub LV_ItemCheck ... Dim Str As String ... MyNext = MyNext - 1 ...
    (microsoft.public.excel.programming)
  • Re: str() should convert ANY object to a string without EXCEPTIONS !
    ... For strings, ... 'ascii' codec can't encode character u'\ue863' in ... And it is correct to fail, ASCII is only defined within range, ... If that str() function has returned anything but error on this, ...
    (comp.lang.python)
  • Re: input a string in gcc
    ... Basically what my code is supposed to do is accept a string from user ... fgets (str, sizeof str, stdin); ... Think of pointers like of checks - if they aren't backed by ... i-th element of arr to point to the j-th char in str. ...
    (comp.lang.c)
  • Re: ISAM error when trying to create tablelink
    ... that will work to change an existing similar tabledef.connect string. ... Doug Steele, Microsoft Access MVP ... Dim rs As New ADODB.Recordset ... Dim str As String ...
    (microsoft.public.access.modulesdaovba)