Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

Bugs in 2.1.4 ?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Christos Chryssochoidis

I'm not sure if the following are bugs of 2.1.4:

1) A variable used in the body of a function that I defined, while it is not defined in the function's var part, the file compiles successfully.

2) The compiler reports error when a code fragment is commented out with { }, while if I remove altogether the code fragment the file compiles successfully.

Flávio Etrusco
to Christos Chryssochoidis
I'm not sure if the following are bugs of 2.1.4:

I'm not sure either ;-)
But since these seem too absurd to be true, just make sure:

1) A variable used in the body of a function that I defined, while it is not defined in the function's var part, the file compiles successfully.

- you're not accessing an external (field or global) variable.

2) The compiler reports error when a code fragment is commented out with { }, while if I remove altogether the code fragment the file compiles successfully.

- you don't have '{' chars inside your comments and nested comments are enabled.

Cheers,
Flávio

Christos Chryssochoidis
to Flávio Etrusco

Certainly the first one was a silly mistake of mine. The function was a method and the variable was a class field.
As for the second I'm not so certain. It really gave me errors when I compiled I have deleted this fragment now, I can't check wether It had any { } inside it, but the compiler's message mentioned
something about a label (of a case statement that I had defined in that commented fragmenta and which was unfinished). After copying- pasting that fragment some times in the file, compiled the file again, with that fragment in it, and the compile was that time successful... Certainly weird.

Thanks anyway for taking the trouble answering,

Christos

Flávio Etrusco wrote 23 lines
> I'm not sure if the following are bugs of 2.1.4: I'm not sure either ;-) But since these seem too absurd to be true, just make sure: > 1) A variable used in the body of a function that I defined, while it > is not defined in the function's var part, the file compiles > successfully. - you're not accessing an external (field or global) variable. > 2) The compiler reports error when a code fragment is commented out > with { }, while if I remove altogether the code fragment the file > compiles successfully. - you don't have '{' chars inside your comments and nested comments are enabled. Cheers, Flávio _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal