In message 1F902E6F.20010309110245.FOO-6B42.frank@g-n-u.de Frank Heckenbach writes:
David James wrote:
Having now looked at an 'Object Pascal Language Guide' that came with a copy of Borland Delphi for Windows, I'm not convinced that class is being handled in the Delphi manner. This Guide says "Unlike other types, a class type can be declared only in a type declaration part in the outermost scope of a program or unit. Therefore, a class type can't be declared in a variable declaration part or within a procedure, function, or method block."
[snip]
should compile (and it doesn't).
I suppose that, while class declarations are allowed only globally in the outermost scope, `class' is a reserved word throughout. That's what the Chief said Delphi does, and what I know TP does with `object'.
I probably read too much into the section I quoted, what you say makes sense.
We could try to make `class' conditionally reserved only in the outermost scope, but I don't know how hard this would be (Peter?),
But you probably shouldn't (for compatibility) if Delphi makes it reserved in places other than the outermost scope.
and it wouldn't solve the issue completely. So I think I'd prefer `disable-keyword' as well...
I think the "news" section of the first part of the manual should document the introduction of class as a conditionally reserved word.
I'm a little surprised. According my old copy of the 19990118 sources, `class' was already conditionally reserved there. But anywaym I will document it,
Thank you. There's certainly been a change in behaviour between 19991030 and 20010306.
as well as `attribute' and `published'
which have become (conditional) keywords since that version AFAICT. If there are more keywords I should mention, let me know.
I've not come across any more, and I've now managed to compile our entire suite of programs under GPC 20010306. The next step is to see what happens when I try running them ...
Have there been any changes in the packing of data in records or packed records between 19991030 and 20010306? Or any changes in the data transfer between variables and typed files (is that the correct name? I mean FILE OF Twhatever, where Twhatever is a TYPE defined in the source)?