Solved

error

Posted on 2012-12-27
6
320 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:khaledsalem
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:khaledsalem
ID: 38723443
the cursor stop at the after the semicolon
0
 
LVL 100

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 19

Accepted Solution

by:
Thommy earned 500 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 45

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now