Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi 6 BIG Bug

22 views
Skip to first unread message

Mike Lockyer

unread,
Jul 12, 2001, 8:30:52 AM7/12/01
to
On my Delphi 6 this is the smallest example of the bug referred to in "error
lines wrong"
Take out the comment and all is well

Explain that one !!

unit bug1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
procedure FormClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormClick(Sender: TObject);
procedure test1;
// Any comment causes bug in line 29 and 31 below - removed it then all is
well
begin
end;

begin
test1
end;


end.


Vik

unread,
Jul 12, 2001, 10:01:23 AM7/12/01
to
"Mike Lockyer" said:
> On my Delphi 6 this is the smallest example of the bug referred to in "error
> lines wrong"
> Take out the comment and all is well
>
> Explain that one !!

No, you explain it. It's just fine with my Delphi 6.

Vik

Nick Hodges (TeamB)

unread,
Jul 12, 2001, 10:09:37 AM7/12/01
to
Mike --

Works fine on my machine.


Nick Hodges - TeamB
HardThink, Inc.

Jan Derk

unread,
Jul 12, 2001, 11:09:30 AM7/12/01
to
> Explain that one !!

Mike,

Did you try to get the carriage returns right (#13#10) as I recommended in
your previous thread?

Strange as my solution sounds I wasn't talking bollocks. It took me
considerable time and had to open the *.pas file with a hex editor. Your
description sounds exactly as the problem I had and is caused by some #10
characters missing at the end of some lines.

You might also read the thread "D6 carriage returns" of 8 July.

Jan Derk


Mike Lockyer

unread,
Jul 12, 2001, 11:17:35 AM7/12/01
to
Thanks for the help

This was a nearly created file


I created a new app
created an onclick event handler
created an internal procedure
compiled - all OK
added a // comment and get 2 errors

Its weird as it is not repeatable on other systems
"Nick Hodges (TeamB)" <nickh...@yahoo.com> wrote in message
news:ksbrktobrm6im33cp...@4ax.com...

Mike Lockyer

unread,
Jul 12, 2001, 11:30:06 AM7/12/01
to
Jan

Thanks for the advice - I had come across that sort of problem before and it
might have been the case this time but

1 This file was nearly created in D6 as a test
2.it was giving errors when no errors existed
3. no one else can recreate it !


"Jan Derk" <jan...@hotmail.com> wrote in message news:3b4dbda5$1_2@dnews...

Mike Lockyer

unread,
Jul 12, 2001, 11:31:12 AM7/12/01
to
Nick

Should I zip all the files and post them

Note it cannot be a #13 problem as it gives errors when there are none and
the file was created in D6 as a test

Mike


"Nick Hodges (TeamB)" <nickh...@yahoo.com> wrote in message
news:ksbrktobrm6im33cp...@4ax.com...

Ralph Friedman (TeamB)

unread,
Jul 12, 2001, 11:49:14 AM7/12/01
to
Mike,

in article <3b4dc2d5_1@dnews>, you wrote:

> Should I zip all the files and post them
>

yes. To borland.public.attachments

---
Regards
Ralph (TeamB)
***

Shiv Kumar

unread,
Jul 12, 2001, 1:38:35 PM7/12/01
to
"Mike Lockyer" <m.a.l...@tees.ac.uk> wrote in message
news:3b4dc294_2@dnews...

> 1 This file was nearly created in D6 as a test

>What do you mean by "nearly created" ?

The first time I saw it I thought it was a typo, but I see you saying this
again...
--
Shiv Kumar
The Delphi Apostle
http://www.matlus.com
http://www.delphisoap.com


Ralph Friedman (TeamB)

unread,
Jul 12, 2001, 1:42:34 PM7/12/01
to
Mike,

in article <3b4dc2d5_1@dnews>, you wrote:

> Note it cannot be a #13 problem as it gives errors when there are none and
> the file was created in D6 as a test
>

it is a #13 problem. In the file bug1.pas in your zip file, the lines starting
with the one containing the single-line comment and ending with the line
containing the call to test1 all end with #13 only, not with #13#10 as they
should.

Ralph Friedman (TeamB)

unread,
Jul 12, 2001, 1:45:05 PM7/12/01
to
Mike,

in article <3b4dc2d5_1@dnews>, you wrote:

> Note it cannot be a #13 problem as it gives errors when there are none and
> the file was created in D6 as a test
>

Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F

00000190 74 31 3B 0D 0A 2F 2F 0D 09 62 65 67 69 6E 0D 09 t1;..//..begin..
000001A0 65 6E 64 3B 0D 0D 62 65 67 69 6E 0D 09 09 74 65 end;..begin...te
000001B0 73 74 31 0D st1.

the above is the hex dump for the lines in question. No at 0A in the bunch.

Mike Lockyer

unread,
Jul 12, 2001, 4:00:46 PM7/12/01
to
My mistake with the words twice

newly created - that is not copied from elsewhere


"Shiv Kumar" <sh...@matlus.com> wrote in message news:3b4ddd91$1_1@dnews...

Mike Lockyer

unread,
Jul 12, 2001, 3:59:55 PM7/12/01
to
Ok I accept that it is a #13 problem

but I therefore ask 2 things

1. How did it get in the code ?
when it was all freshly typed not copied from anywhere

2. why does it give an error ?

Did you also get a compile error ?

Thanks for the reminder that I should always double check things before I
make assertions

Mike

"Ralph Friedman (TeamB)" <rft...@utanet.at> wrote in message
news:VA.00000b8...@della.garlin...

Mike Lockyer

unread,
Jul 12, 2001, 4:05:45 PM7/12/01
to
Further on

I have just repeated the exercise and don't get the same problem so the
missing #10 must have been a paste or left over - my fault

Answer to 1 - me:=idiot

So question 2 still remains

why does a missing #10 cause a compile error ?

Mike


"Mike Lockyer" <m.a.l...@tees.ac.uk> wrote in message

news:3b4e01d0_2@dnews...

Jan Derk

unread,
Jul 12, 2001, 4:34:01 PM7/12/01
to
> why does a missing #10 cause a compile error ?

This is a complex issue. Delphi 6 should not change unix carriage returns
into Windows carriage returns as the code should remain compatible with
Kylix.

However, the problem is that Delphi 6 is not consequent. The editor shows
Unix type line endings just fine, but the "blue dots" or breakpoint code
does not. So the two are out of sync and users start getting error messages
where they do not expect them.

The solution would be that the blue dot process and the breakpoint code
would also accept Unix (or Mac) line endings (like D5 does) just like the
editor does . That would solve this synchronize problem for once and
forever. It's a small (but very confusing) bug in D6.

Jan Derk


Mike Lockyer

unread,
Jul 12, 2001, 4:54:12 PM7/12/01
to
Jan

That still does not explain why you get an error when the code is correct


"Jan Derk" <jan...@hotmail.com> wrote in message news:3b4e09b5_1@dnews...

Ralph Friedman (TeamB)

unread,
Jul 13, 2001, 2:56:11 AM7/13/01
to
Mike,

in article <3b4e0e8a_1@dnews>, you wrote:

> That still does not explain why you get an error when the code is correct
>

I suspect it is because the parser is looking for #13#10 as a token and doesn't
find it.

Damir Vadas

unread,
Jul 15, 2001, 1:56:11 PM7/15/01
to
Try to delete .dsk file in app dir!!!!
Bye..Damir

"Mike Lockyer" <m.a.l...@tees.ac.uk> schrieb im Newsbeitrag
news:3b4dbfa4$1_1@dnews...

Robert Lakinski

unread,
Jul 17, 2001, 5:37:55 AM7/17/01
to
I cannot reproduce you problem


"Mike Lockyer" <m.a.l...@tees.ac.uk> wrote in message

news:3b4da874_2@dnews...

ilya.m....@gmail.com

unread,
Jul 7, 2014, 9:03:48 AM7/7/14
to
вторник, 17 июля 2001 г., 13:41:06 UTC+4 пользователь Robert Lakinski написал:
Yes. The problem still not fixed even in Delphi 2007. Thanks for the case, it helped me to solve the problem. Definitely a <cr><lf> bug.
0 new messages