Re: [fpc-pascal] method-definition

2023-12-15 Thread Hairy Pixels via fpc-pascal
> On Dec 15, 2023, at 8:56 PM, Adriaan van Os via fpc-pascal > wrote: > > What complicates things, is that many conflicting rules have the same name in > the Language Reference. For example, conceptually we have object-methods, > record-methods, class-methods, interface-methods and

Re: [fpc-pascal] method-definition

2023-12-15 Thread Mattias Gaertner via fpc-pascal
On 15.12.23 16:00, Martin Frb via fpc-pascal wrote: [...] However, a method can be reintroduced, and be virtual/abstract. type   TFoo = class     procedure Bar; virtual; abstract;   end;   TFoo2 = class(TFoo)     procedure Bar; reintroduce; virtual; abstract;   end; Can that make

Re: [fpc-pascal] method-definition

2023-12-15 Thread Martin Frb via fpc-pascal
On 15/12/2023 14:56, Adriaan van Os via fpc-pascal wrote: I am puzzled by the syntax rule in Chapter 6. Classes of the FreePascal Language Reference (version 3.2.0) Section 6.1 Class definitions has method-definition = [ "CLASS" ] ( function-header | procedure-header |

[fpc-pascal] method-definition

2023-12-15 Thread Adriaan van Os via fpc-pascal
I am puzzled by the syntax rule in Chapter 6. Classes of the FreePascal Language Reference (version 3.2.0) Section 6.1 Class definitions has method-definition = [ "CLASS" ] ( function-header | procedure-header | constructor-header | destructor-header ) ";" [ ( ( ( "virtual" | "dynamic" ) [

Re: [fpc-pascal] case statement

2023-12-15 Thread Adriaan van Os via fpc-pascal
Jean SUZINEAU via fpc-pascal wrote: Le 15/12/2023 à 10:39, Adriaan van Os via fpc-pascal a écrit : I don't see a semicolon in the formal syntax. May be included in the ' "DO" statement ' ? No, have a look at the syntax diagrams, statements never end with a semicolon. Regards, Adriaan van

Re: [fpc-pascal] case statement

2023-12-15 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: The fact that the semicolon before the else is optional ? I don't see a semicolon in the formal syntax. This works: OK, than an optional semicolon must be added to the rule exceptionhandlers = [ exception-handler { ";" exception-handler } [ ";"

Re: [fpc-pascal] case statement

2023-12-15 Thread Jean SUZINEAU via fpc-pascal
Le 15/12/2023 à 10:39, Adriaan van Os via fpc-pascal a écrit : I don't see a semicolon in the formal syntax. May be included in the ' "DO" statement ' ? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] case statement

2023-12-15 Thread Michael Van Canneyt via fpc-pascal
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote: Note that the same ambiguity exists in the syntax (and this is less well known) exceptionhandlers = [ exception-handler { ";"

Re: [fpc-pascal] case statement

2023-12-15 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote: Note that the same ambiguity exists in the syntax (and this is less well known) exceptionhandlers = [ exception-handler { ";" exception-handler } [ "ELSE" statement-list ] |

Re: [fpc-pascal] case statement

2023-12-15 Thread Michael Van Canneyt via fpc-pascal
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote: Note that the same ambiguity exists in the syntax (and this is less well known) exceptionhandlers = [ exception-handler { ";" exception-handler } [ "ELSE" statement-list ] | statement-list ] . exception-handler = "ON" [

Re: [fpc-pascal] case statement

2023-12-15 Thread Adriaan van Os via fpc-pascal
Note that the same ambiguity exists in the syntax (and this is less well known) exceptionhandlers = [ exception-handler { ";" exception-handler } [ "ELSE" statement-list ] | statement-list ] . exception-handler = "ON" [ identifier ":" ] class-type-identifier "DO" statement . as ends with