[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

error

Posted on 2012-12-27
6
Medium Priority
?
330 Views
Last Modified: 2013-05-07
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
Comment
Question by:khaled salem
6 Comments
 
LVL 24

Expert Comment

by:jimyX
ID: 38723303
What happens if you put the cursor before the semicolon and press END button on your keyboard?
0
 

Author Comment

by:khaled salem
ID: 38723443
the cursor stop at the after the semicolon
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 38723857
Can you copy the lines to a text file and upload it?

Which line is the error on?

mlmcc
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Accepted Solution

by:
Thommy earned 1000 total points
ID: 38726715
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
 
LVL 46

Expert Comment

by:aikimark
ID: 38729224
As a follow-up on the Thommy comment, I see non-ASCII characters in your
If Query3333['name']=

Open in new window

statement.
0
 
LVL 19

Expert Comment

by:Thommy
ID: 38735164
@aikimark
I've also recognized your mentionend characters.
These chars will also be handled by my suggested solution...
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question