Sign in Join

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

Mailing lists / fpc-pascal / 2015-10

bug in Interface documentation?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Speaking of Interfaces, there seems to be a bug (omission) in the Interface syntax diagram.

http://www.freepascal.org/docs-html/ref/refse39.html

The syntax diagram suggests that multiple interfaces can't be specified in the "heritage" section.

I believe the diagram should look something like the following instead:

[mono font required]

>─── heritage ── ( ──┬─ interface type identifier ──┬─ ) ───────><

^───────────── , ──────────────┘

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp
Dmitry Boyarintsev
to Graeme Geldenhuys

On Mon, Oct 12, 2015 at 11:51 AM, Graeme Geldenhuys <

Show quoted text 5 lines
wrote: The syntax diagram suggests that multiple interfaces can't be specified in the "heritage" section.

Are you saying that interfaces allow multiple inheritance? I don't think they do.

A class can implement multiple interfaces (thus the listing them through the comma is fine), but an interface can inherit only from one interface.

thanks,
Dmitry

Michael Van Canneyt
to Graeme Geldenhuys: Speaking of Interfaces, there seems to be a bug (omission) in the Interface syntax…
Graeme Geldenhuys wrote 9 lines
Hi, Speaking of Interfaces, there seems to be a bug (omission) in the Interface syntax diagram. http://www.freepascal.org/docs-html/ref/refse39.html The syntax diagram suggests that multiple interfaces can't be specified in the "heritage" section.

The diagram is correct.

Show quoted text 7 lines
I believe the diagram should look something like the following instead: [mono font required] >> ─── heritage ── ( ──┬─ interface type identifier ──┬─ ) ───────>< ^───────────── , ──────────────┘

No. This is only so for classes.

Michael.