Re: Line too long ???



I'll try this one as well.. But I still don't understand what happened and why. All of the other sources are ok.

<alanglloyd@xxxxxxx> ha scritto nel messaggio news:1192485317.761099.153050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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: How to call a function of an user defined DLL from Excel?
    ... Public Function DllMain(hInst As Long, fdwReason As Long, lpvReserved As ... Public Function Increment(ByVal var As Integer) As Integer ... Public Function mytrim2(ByVal str As String) As String ...
    (microsoft.public.excel.programming)
  • 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)