Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

error

Posted on 2012-12-27
6
324 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 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE2 application frozen on Windows 10 10 335
Delphi and Access based Enumeration 9 70
Graphics32 under Delphi 10.1 Berlin 2 95
DBCtrlGrid, Delphi, Scroll 8 33
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

765 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