Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

error

Hi all:
I've run my old program by Delphi 5, with Delphi 2010. the following error appear
"More than 1023 characters"
more thani am sure the line length less than 255 characters.
0
khaled salem
Asked:
khaled salem
1 Solution
 
jimyXCommented:
What happens if you put the cursor before the semicolon and press END button on your keyboard?
0
 
khaled salemSoftware DeveloperAuthor Commented:
the cursor stop at the after the semicolon
0
 
mlmccCommented:
Can you copy the lines to a text file and upload it?

Which line is the error on?

mlmcc
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
ThommyCommented:
You probably have some non-printable characters in your sourcecode line and/or your line breaks are non-Windows style.

Try this to convert your sourcecode file U123.pas...

procedure TForm1.Button1Click(Sender: TObject);
var
  sl : TStringList;
  s  : String;
  i  : integer;
begin
  if OpenDialog1.Execute then begin
    sl := TStringList.create;
    sl.LoadFromFile(OpenDialog1.FileName);
    s := AdjustLineBreaks(sl.text);
    for i := 1 to length(s) do begin
      if (s[ i ] < ' ') and not (s[i] in [#13,#10]) then begin
        s [ i ] := ' ';
      end;
    end;
    sl.text := s;
    sl.SaveToFile(OpenDialog1.FileName+'.new');
  end;
end;

Open in new window

Above code adjusts line breaks to Windows style and replaces non-printable characters with spaces...
0
 
aikimarkCommented:
As a follow-up on the Thommy comment, I see non-ASCII characters in your
If Query3333['name']=

Open in new window

statement.
0
 
ThommyCommented:
@aikimark
I've also recognized your mentionend characters.
These chars will also be handled by my suggested solution...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now