Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Too long error!!!

Status
Not open for further replies.

krangan

Programmer
May 29, 2001
1
US
Hi All,

I try to compile a delphi application but am getting an
error message "Line to long " (more than 1023 characters)
What does this mean? (Acutally,line is very short!!!)

Thanks,

Kas
 
Could you tell us what the line is and what is befor and after it
 
You have some non printable characters in your source, probably.

I had the same problem using sources from the fpc project.

The line that shows the error does not realy need to be the wrong line.

Try to write a smal prog to scan the source

sample code :

var
sl : TStringList;
s : String;
i : integer;
begin
sl := TStringList.create;
sl.LoadFromFile('...your file name...');
s := AdjustLineBreaks(sl.text);
for i := 1 to length(s) do begin
if (s[ i ] < ' ') and not (s in [#13,#10]) then begin
s [ i ] := ' ';
end;
end;
sl.text := s;
sl.SaveToFile('modified.pas');
end;

this should help.
 
Hi every1,
Just writing to say that I've got a similar problem, though, I don't know if it can be solved the same way as krangan's problem. Last year my computer crashed corrupting alot of my files, Delphi projects also. I saved some important projects using Lost&Found and stored those files on a backup CD-ROM. When my computer was back online I tested the saved project files on a fresh Delphi install, but the source code contained in those projects was corrupted, and as a result I got a &quot;Line too long&quot; error, similar to krangan's. The respective line(s) had to be truncated in order for Delphi to open those source codes. This scrambled the code to one of my most advanced chat applications, that I had written just before the computer crash. Now I can only access the last 1/3 of the source code, since everything above it gets truncated. I have no clue how to solve this problem - If anyone knows, please reply, I'll be thankful for any and all help that I get :)

-Steinar Skaalvik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top