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.
No, you explain it. It's just fine with my Delphi 6.
Vik
Works fine on my machine.
Nick Hodges - TeamB
HardThink, Inc.
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
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...
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...
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...
in article <3b4dc2d5_1@dnews>, you wrote:
> Should I zip all the files and post them
>
yes. To borland.public.attachments
---
Regards
Ralph (TeamB)
***
>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
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.
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.
newly created - that is not copied from elsewhere
"Shiv Kumar" <sh...@matlus.com> wrote in message news:3b4ddd91$1_1@dnews...
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...
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...
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
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...
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.
"Mike Lockyer" <m.a.l...@tees.ac.uk> schrieb im Newsbeitrag
news:3b4dbfa4$1_1@dnews...
"Mike Lockyer" <m.a.l...@tees.ac.uk> wrote in message
news:3b4da874_2@dnews...