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)?
David James wrote:
In message 1F902E6F.20010309110245.FOO-6B42.frank@g-n-u.de Frank Heckenbach writes:
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.
Well, it would be upwardly compatible to Delphi, i.e. what's legal in Delphi remains legal by this. So I think it would be ok from this point of view.
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)?
I don't think so, but I'm not completely sure. Perhaps Peter knows better.
Frank
On Fri, 9 Mar 2001, David James wrote:
[snip]
should compile (and it doesn't).
Just for fun tried it under BP7:
Borland Pascal Version 7.0 Copyright (c) 1983,92 13 lines, 0.1 Sec, 1488 bytes code, 668 bytes data
Checking Borland Pascal Language Guide, "class" is not in the reserved word list and is not listed in the index.
This is presented for information only and is not a recomendation that GPC be compatable.
Russ
Russ Whitaker wrote:
Just for fun tried it under BP7:
Borland Pascal Version 7.0 Copyright (c) 1983,92 13 lines, 0.1 Sec, 1488 bytes code, 668 bytes data
Checking Borland Pascal Language Guide, "class" is not in the reserved word list and is not listed in the index.
This is presented for information only and is not a recomendation that GPC be compatable.
Well, GPC is compatible -- with `--borland-pascal' `class' is not a keyword.
Frank
David James wrote:
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)?
I am not aware of any.
But do not rely too much on such things since they might change, for instance, when new types of processors show up.
Peter