In message <4C6E5C32.20010308193203.FOO-4495.frank@g-n-u.de> Frank Heckenbach writes:
Peter Gerwinski 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." So an example similar to the example I posted last night: program test_class(input,output); type tcomp=packed record name:string[80]; class:1..15; end; var comp:tcomp; begin end. should fail. However, I think the following example: program test_class2(input,output); procedure proc; type tcomp=packed record name:string[80]; class:1..15; end; var comp:tcomp; begin end; begin proc; end. should compile (and it doesn't). I think the "news" section of the first part of the manual should document the introduction of class as a conditionally reserved word. For the moment Russ Whitaker's suggestion of {$define class thing} as a quick and dirty patch looks the easiest way for me to proceed with this upgrade.
The question is whether a separate switch, specifically for enabling/disabling keywords, makes sense.
[...] I mean something like `--disable-keyword="Class"'.
Perhaps accept a list of keywords, e.g. `--disable-keywords="class,object"'.
I like that scheme, since, as I posted earlier, I have source code which is such a collection of different dialects within single files that the dialect switches are no use to me. -- David James mailto:david@tcs01.demon.co.uk Special Stage Rally results archive <URL:http://www.tcs01.demon.co.uk/>